Share via


CPrintDialogEx::DoModal

Call this function to display the Windows 2000 common Print property sheet and allow the user to select various printing options such as the number of copies, page range, and whether copies should be collated.

virtual INT_PTR DoModal( );

Return Value

The INT_PTR return value is actually an HRESULT. See the Return Values section in PrintDlgEx in the Windows SDK.

Remarks

If you want to initialize the various print dialog options by setting members of the m_pdex structure, you should do this before calling DoModal, but after the dialog object is constructed.

After calling DoModal, you can call other member functions to retrieve the settings or information input by the user into the dialog box.

If the PD_RETURNDC flag is used when calling DoModal, a printer DC will be returned in the hDC member of m_pdex. This DC must be freed with a call to DeleteDC by the caller of CPrintDialogEx.

Requirements

Header: afxdlgs.h

See Also

Reference

CPrintDialogEx Class

Hierarchy Chart

CPrintDialogEx::CPrintDialogEx

CDialog::DoModal