Share via


CPrintDialogEx::CreatePrinterDC

Creates a printer device context (DC) from the DEVMODE and DEVNAMES structures.

HDC CreatePrinterDC( );

Return Value

Handle to the newly created printer device context.

Remarks

The returned DC is also stored in the hDC member of m_pdex.

This DC is assumed to be the current printer DC, and any other previously obtained printer DCs must be deleted. This function can be called, and the resulting DC used, without ever displaying the Print dialog box.

Requirements

Header: afxdlgs.h

See Also

Reference

CPrintDialogEx Class

Hierarchy Chart

CPrintDialogEx::GetPrinterDC

CPrintDialogEx::GetDevMode