hiba

hiba

  • NA
  • 1
  • 0

printing out to file directly without the dialog

Nov 15 2006 8:44 PM

I'd like to implement API functionality in C++ to allow the user to print directly and essentially bypass the print dialog. This works well if we are printing out to the printer, the difficulty is when the user wants to print out to a file.
Looking at CView::OnFilePrint(), if the PD_PRINTTOFILE flag is set then it goes ahead and displays the "Print To File" dialog. How can I bypass this dialog and instead pass the name of the output file?
 
One suggestion I found online was to pass the name of the output file as the port name. However I couldn't see how to do that.
 
I'd appreciate any tips

hiba