Constants - Print Dialog Flags¶
PrintDialog piFlags constants
| Constant | Description |
|---|---|
PD_ALLPAGES |
The default flag that indicates that the All radio button is initially selected. This flag is used as a placeholder to indicate that the PD_PAGENUMS, PD_SELECTION, and PD_CURRENTPAGE flags are not specified. |
PD_SELECTION |
If this flag is set, the Selection radio button is selected. If none of the PD_PAGENUMS, PD_SELECTION, or PD_CURRENTPAGE flags is set, the All radio button is selected. |
PD_PAGENUMS |
If this flag is set, the Pages radio button is selected. If none of the PD_PAGENUMS, PD_SELECTION, or PD_CURRENTPAGE flags is set, the All radio button is selected. If this flag is set when the PrintDlgEx function returns, the lpPageRanges member indicates the page ranges specified by the user. |
PD_NOSELECTION |
Disables the Selection radio button. |
PD_NOPAGENUMS |
Disables the Pages radio button and the associated edit controls. Also, it causes the Collate check box to appear in the dialog. |
PD_COLLATE |
If this flag is set, the Collate check box is selected. If this flag is set when the PrintDlgEx function returns, the application must simulate collation of multiple copies. For more information, see the description of the PD_USEDEVMODECOPIESANDCOLLATE flag. See PD_NOPAGENUMS. |
PD_PRINTTOFILE |
If this flag is set, the Print to File check box is selected. If this flag is set when PrintDlgEx returns, the offset indicated by the wOutputOffset member of the DEVNAMES structure contains the string "FILE:". When you call the StartDoc function to start the printing operation, specify this "FILE:" string in the lpszOutput member of the DOCINFO structure. Specifying this string causes the print subsystem to query the user for the name of the output file. |
PD_PRINTSETUP |
- |
PD_NOWARNING |
Prevents the warning message from being displayed when an error occurs. |
PD_RETURNDC |
Causes PrintDlgEx to return a device context matching the selections the user made in the property sheet. The device context is returned in hDC. This flag is automatically added by the PrintDialog function. |
PD_RETURNIC |
Similar to the PD_RETURNDC flag, except this flag returns an information context rather than a device context. If neither PD_RETURNDC nor PD_RETURNIC is specified, hDC is undefined on output. |
PD_RETURNDEFAULT |
If this flag is set, the PrintDlgEx function does not display the property sheet. Instead, it sets the hDevNames and hDevMode members to handles to DEVNAMES and DEVMODE structures that are initialized for the system default printer. Both hDevNames and hDevMode must be NULL, or PrintDlgEx returns an error. |
PD_SHOWHELP |
- |
PD_ENABLEPRINTHOOK |
- |
PD_ENABLESETUPHOOK |
- |
PD_ENABLEPRINTTEMPLATE |
Indicates that the hInstance and lpPrintTemplateName members specify a replacement for the default dialog box template in the lower portion of the General page. The default template contains controls similar to those of the Print dialog box. The system uses the specified template to create a window that is a child of the General page. This flag is removed by the PrintDialog function as it is unsupported by DataFlex Reports. |
PD_ENABLESETUPTEMPLATEHANDLE |
- This flag is removed by the PrintDialog function as it is unsupported by DataFlex Reports. |
PD_USEDEVMODECOPIESPD_USEDEVMODECOPIESANDCOLLATE |
This flag indicates whether your application supports multiple copies and collation. Set this flag on input to indicate that your application does not support multiple copies and collation. In this case, the nCopies member of the PRINTDLGEX structure always returns 1, and PD_COLLATE is never set in the Flags member. If this flag is not set, the application is responsible for printing and collating multiple copies. In this case, the nCopies member of the PRINTDLGEX structure indicates the number of copies the user wants to print, and the PD_COLLATE flag in the Flags member indicates whether the user wants collation. Regardless of whether this flag is set, an application can determine from nCopies and PD_COLLATE how many copies to render and whether to print them collated. If this flag is set and the printer driver does not support multiple copies, the Copies edit control is disabled. Similarly, if this flag is set and the printer driver does not support collation, the Collate check box is disabled. The dmCopies and dmCollate members of the DEVMODE structure contain the copies and collate information used by the printer driver. If this flag is set and the printer driver supports multiple copies, the dmCopies member indicates the number of copies requested by the user. If this flag is set and the printer driver supports collation, the dmCollate member of the DEVMODE structure indicates whether the user wants collation. If this flag is not set, the dmCopies member always returns 1, and the dmCollate member is always zero. In Windows versions prior to Windows Vista, if this flag is not set by the calling application and the dmCopies member of the DEVMODE structure is greater than 1, use that value for the number of copies; otherwise, use the value of the nCopies member of the PRINTDLGEX structure. |
PD_DISABLEPRINTTOFILE |
Disables the Print to File check box. |
PD_HIDEPRINTTOFILE |
Hides the Print to File check box. |
PD_NONETWORKBUTTON |
- |
PD_CURRENTPAGE |
If this flag is set, the Current Page radio button is selected. If none of the PD_PAGENUMS, PD_SELECTION, or PD_CURRENTPAGE flags is set, the All radio button is selected. |
PD_NOCURRENTPAGE |
Disables the Current Page radio button. |
PD_EXCLUSIONFLAGS |
Indicates that the ExclusionFlags member identifies items to be excluded from the printer driver property pages. If this flag is not set, items will be excluded by default from the printer driver property pages. The exclusions prevent the duplication of items among the General page, any application-specified pages, and the printer driver pages. |
PD_USELARGETEMPLATE |
Forces the property sheet to use a large template for the General page. The larger template provides more space for applications that specify a custom template for the lower portion of the General page. This flag is removed by the PrintDialog function as it is unsupported by DataFlex Reports. |