[This is preliminary documentation and subject to change.]
The PrintDlgEx function displays a Print property sheet that enables the user to specify the properties of a particular print job. A Print property sheet has a General page containing controls similar to the Print common dialog box. The property sheet can also have additional application-specific and driver-specific property pages following the General page.
HRESULT PrintDlgEx(
LPPRINTDLGEX lppd // pointer to structure with initialization data
);
If the function succeeds, the return value is S_OK and the dwResultAction member of the PRINTDLGEX structure contains one of the following values.
Value | Meaning |
---|---|
PD_RESULT_APPLY | The user clicked the Apply button and later clicked the Cancel button. This indicates that the user wants to apply the changes made in the property sheet, but does not yet want to print. The PRINTDLGEX structure contains the information specified by the user at the time the Apply button was clicked. |
PD_RESULT_CANCEL | The user clicked the Cancel button. The information in the PRINTDLGEX structure is unchanged. |
PD_RESULT_PRINT | The user clicked the Print button. The PRINTDLGEX structure contains the information specified by the user. |
If the function fails, the return value may be one of the following COM error codes. For more information, see Error Handling.
Value | Meaning |
---|---|
E_OUTOFMEMORY | Insufficient memory. |
E_INVALIDARG | One or more arguments are invalid. |
E_POINTER | Invalid pointer. |
E_HANDLE | Invalid handle. |
E_FAIL | Unspecified error. |
For more information, see Print Property Sheet.
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in commdlg.h.
Import Library: Use comdlg32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Common Dialog Box Library Overview, Common Dialog Box Functions, CreatePropertySheetPage, PrintDlg, PRINTDLGEX