Skip to content

piFlags - cPrintDialog

Methods - Properties

Type

UInteger

Default

PD_NOPAGENUMS ior PD_NOSELECTION ior PD_USEDEVMODECOPIES

Arguments

None

Description

A set of bit flags that you can use to initialize the Print property sheet.

When PrintDlgEx is called by PrintDialog and the function returns, it sets these flags to indicate the user's input.

This member can be one or more of the bit flags. To ensure that PrintDlgEx returns the correct values in the piCopies and peCollate members of the DEVMODEW structure, set PD_RETURNDC = TRUE and PD_USEDEVMODECOPIESANDCOLLATE = TRUE. In so doing, the piCopies member of the PRINTDLGEX structure is always 1 and PD_COLLATE is always DMCOLLATE_FALSE.

To ensure that PrintDlgEx returns the correct values in piCopies and PD_COLLATE, set PD_RETURNDC = TRUE and PD_USEDEVMODECOPIESANDCOLLATE = FALSE. In so doing, piCopies is always 1 and peCollate is always DMCOLLATE_FALSE.

When you call PrintDialog with PD_RETURNDC set to TRUE and PD_USEDEVMODECOPIESANDCOLLATE set to FALSE, the PrintDlgEx function sets the number of copies in the dmCopies member of the PRINTDLGEX structure, and it sets the number of copies in the structure represented by the hDC member of the PRINTDLGEX structure.

Sample

Object oReport is a cDRReport
    Set psReportName to 'MyReport.dr'

    Procedure OnInitializeReport
        Handle hoPrintDialog

        Forward Send OnInitializeReport

        Get phoPrintDialog to hoPrintDialog
        Set piFlags of hoPrintDialog to (PD_RETURNDEFAULT ior PD_NOPAGENUMS)
    End_Procedure
End_Object