CPrintDialog::CreatePrinterDC
Crear un contexto (DC) de dispositivo de la impresora de estructuras de DEVMODE y de DEVNAMES .
HDC CreatePrinterDC( );
Valor devuelto
Identificador del contexto creado recientemente de dispositivo de la impresora.
Comentarios
Esta TITLE. se asume que la TITLE. actual de la impresora, y cualquier otra obtuvo previamente la impresora que DCs debe eliminarse por el usuario.Esta función puede llamar, y DC resultante utilizar, sin nunca mostrar el cuadro de diálogo imprimir.
Ejemplo
// 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);
}
Requisitos
encabezado: afxdlgs.h