HDC CreatePrinterDC( );
Return Value
Handle to the newly created printer device context.
Remarks
Creates a printer device context (DC) from the DEVMODE and DEVNAMES structures. This DC is assumed to be the current printer DC, and any other previously obtained printer DCs must be deleted by the user. This function can be called, and the resulting DC used, without ever displaying the Print dialog box.
Example
// Display the Windows Print dialog box with "All" radio button
// initially selected. All other radio buttons are disabled.
CPrintDialog dlg(FALSE);
if (dlg.DoModal() == IDOK)
{
// Create a printer device context (DC) based on the information
// selected from the Print dialog.
HDC hdc = dlg.CreatePrinterDC();
ASSERT(hdc);
}
CPrintDialog Overview | Class Members | Hierarchy Chart
See Also CPrintDialog::GetDevMode