Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content


Call this member function to select a specific printer, and release the printer that was previously selected in the Print Dialog box.

void SelectPrinter( 
   HANDLE hDevNames, 
   HANDLE hDevMode, 
   BOOL bFreeOld = TRUE  


A handle to a DEVNAMES structure that identifies the driver, device, and output port names of a specific printer.


A handle to a DEVMODE structure that specifies information about the device initialization and environment of a printer.


Frees the previously-selected printer.

If both hDevMode and hDevNames are NULL, SelectPrinter uses the current default printer.

Header: afxwin.h

© 2015 Microsoft