Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic


Call this member function to create a printer device context (DC) from the selected printer.

BOOL CreatePrinterDC( 
   CDC& dc  

A reference to a printer device context.

Nonzero if the printer device context is created successfully; otherwise 0.

CreatePrinterDC initializes the device context that you pass in by reference, so you can use it to print.

If the function is successful, when you have finished printing, you must destroy the device context. You can let the destructor of the CDC object do it, or you can do it explicitly by calling CDC::DeleteDC.

Header: afxwin.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.