The information in this article applies to:
SUMMARYBy design, a Print dialog box is displayed in MFC printing. This dialog box allows the user to change the printer settings before a printer device context (DC) is created. However, there are cases when the print dialog box is not a good idea. This article provides a way to bypass the Print dialog box for a print job. MORE INFORMATION
CView::OnPreparePrinting is the first virtual function called during the
print process. It is also called during print preview. AppWizard provides
an implementation of OnPreparePrinting that calls CView::DoPreparePrinting.
DoPreparePrinting displays the print dialog box for actual printing but not
for print preview.
Sample Code
REFERENCESFor more information about the MFC printing, please refer to the Programming with the Microsoft Foundation Class Library in Books Online. Additional query words: kbinf 1.50 1.51 1.52 1.00 2.00 2.10 2.20 2.50 2.51 2.52 2.10 3.00 3.10 3.20
Keywords : kbcode kbMFC kbPrinting kbVC |
Last Reviewed: August 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |