Click to See Complete Forum and Search --> : Printing


tatang
April 15th, 1999, 07:49 AM
Ppl I need a little printing 101 here. How to set the values of CPrintInfo class especially the values of DEVMODE struct? I am developing a print module that uses a customized printing interface rather than using the common printing dialog. But i have trouble :( in setting the DEVMODE values (ie. paper size, orientation, etc). Help pls...okay, okay, I need BIG help hehe. So help pls :)

A programmer in need

April 15th, 1999, 09:20 AM
Have a peek at the MFC source code for CView::DoPreparePrinting(). There is good info on how to fill out the CPrintInfo class member. One of the members is a print direct boolean, that stops the print dialog from coming up, and instead creates the printer DC for the default printer. I've used this several times and it works quite well. Also if you are using Doc/View for your app, there is a little know command called ID_FILE_PRINT_DIRECT that usually does the trick. Good Luck.

Chris