Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

WindowsPrintDialogMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Printing MBS Win Plugin 12.1 No Yes No Yes, Windows only No
Function: The class for showing the windows print dialog.

Feedback, Comments & Corrections

Flag Constants

Constant Value Description
PD_ALLPAGES 0 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_COLLATE &h00000010 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_CURRENTPAGE &h00400000 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_DISABLEPRINTTOFILE &h00080000 Disables the Print to File check box.
PD_EXCLUSIONFLAGS &h01000000 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_EXCL_COPIESANDCOLLATE &h00008100 Excludes the Copies and Collate controls from the printer driver property pages in a Print property sheet. This flag should always be set when the application uses the default Copies and Collate controls provided by the lower portion of the General page of the Print property sheet.
PD_HIDEPRINTTOFILE &h00100000 Hides the Print to File check box.
PD_NOCURRENTPAGE &h00800000 Disables the Current Page radio button.
PD_NONETWORKBUTTON &h00200000 Hides and disables the Network button.
PD_NOPAGENUMS 8 Disables the Pages radio button and the associated edit controls.
Also, it causes the Collate check box to appear in the dialog.
PD_NOSELECTION 4 Disables the Selection radio button.
PD_NOWARNING &h00000080 Prevents the warning message from being displayed when an error occurs.
PD_PAGENUMS 2 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 PrintDialog function returns, the PageRanges member indicates the page ranges specified by the user.
PD_PRINTSETUP &h00000040 Causes the system to display the Print Setup dialog box rather than the Print dialog box.
PD_PRINTTOFILE &h00000020 If this flag is set, the Print to File check box is selected.
If this flag is set when PrintDialog returns, the OutputName of DevNames contains the string "FILE:". When you call the StartDoc function to start the printing operation, specify this "FILE:" string in the Output parameter member of the DOCINFO structure. Specifying this string causes the print subsystem to query the user for the name of the output file.
StartDoc is available in our plugins through StartDocPrinter in WindowsAddPrintJobMBS class.
PD_RETURNDC &h00000100 Causes PrintDialog to return a device context matching the selections the user made in the property sheet.
The device context is returned in DC property.
PD_RETURNDEFAULT &h00000400 If this flag is set, the PrintDialog function does not display the property sheet.
Instead, it sets the DevNames and DevMode members to the default for the system default printer. Both DevNames and DevMode must be empty, or PrintDialog returns an error.
PD_RETURNIC &h00000200 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_SELECTION 1 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_SHOWHELP &h00000800 Causes the dialog box to display the Help button.
PD_USEDEVMODECOPIES &h00040000 Same as PD_USEDEVMODECOPIESANDCOLLATE.
PD_USEDEVMODECOPIESANDCOLLATE &h00040000 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 Copies member of the class 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 Copies property 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 Copies 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 Copies and Collate members of the WindowsDeviceModeMBS object contain the copies and collate information used by the printer driver. If this flag is set and the printer driver supports multiple copies, theCopies member indicates the number of copies requested by the user. If this flag is set and the printer driver supports collation, the Collate member of the WindowsDeviceModeMBS object indicates whether the user wants collation. If this flag is not set, the dmCopies member always returns 1, and the Collate 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 WindowsDeviceModeMBS object is greater than 1, use that value for the number of copies; otherwise, use the value of the Copies member of this class.

Result Constants

Constant Value Description
PD_RESULT_APPLY 2 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 WindowsPrintDialogMBS contains the information specified by the user at the time the Apply button was clicked.
PD_RESULT_CANCEL 0 The user clicked the Cancel button. The information in the WindowsPrintDialogMBS is unchanged.
PD_RESULT_PRINT 1 The user clicked the Print button. The WindowsPrintDialogMBS contains the information specified by the user.

This class has no sub classes.

Some examples which use this class:


The items on this page are in the following plugins: MBS Win Plugin.


WindowsPreviewHandlerMBS   -   WindowsPrinterInfoMBS




Links
MBS FileMaker Plugins