Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
AdvancedSetUpDialog
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
WORD AdvancedSetUpDialog(hWnd, hDriver, lpDevModeIn, lpDevModeOut)
HWND hWnd;
HANDLE hDriver;
LPDEVMODE lpDevModeIn;
LPDEVMODE lpDevModeOut;
 
The AdvancedSetUpDialog function displays a dialog box with which the user
sets advanced print-job options. Applications call this function indirectly
whenever the user chooses the Options button in the Print Setup dialog box.
AdvancedSetUpDialog lets the user specify print-job options that the driver
supports, such as color, duplex printing, and text quality, but that are not
available through the Print Setup dialog boxes.
 
Printer drivers that do not export AdvancedSetUpDialog must export the
ExtDeviceMode function.
 
Parameter     Description
────────────────────────────────────────────────────────────────────────────
 
 
hWnd          Identifies the parent window. AdvancedSetUpDialog uses this
              handle as the parent window handle when it creates the dialog
              box.
 
hDriver       Identifies the module instance of the device driver.
              AdvancedSetUpDialog uses this handle as the module instance
              handle when it creates the dialog box.
 
lpDevModeIn   Points to a DEVMODE structure specifying the initial values
              for the advanced printer options in the dialog box. If the
              lpDevModeIn parameter is NULL or the dmSpecVersion member in
              this DEVMODE structure is less than 0x0300,
              AdvancedSetUpDialog must return -1 without displaying the
              dialog box.
 
lpDevModeOut  Points to a DEVMODE structure that receives the final values
              for the advanced printer options. The final values include any
              input from the user. If the user cancels the dialog box,
              AdvancedSetUpDialog must at least copy the initial values
              (supplied in the lpDevModeIn parameter) to the lpDevModeOut
              parameter. The lpDevModeOut parameter must specify all print
              settings, not just those changed by the user.
 
Return Value
 
The return value is IDOK if the user chose the OK button to exit the dialog
box, or IDCANCEL if the user chose the Cancel button. In either case, the
structure pointed to by lpDevModeOut contains final values for the advanced
pint-job options. If an error occurs, the function returns -1.
 
Comments
 
The export ordinal for this function is 93.
 
AdvancedSetUpDialog creates an application-modal dialog box using the
DialogBox function (USER.240). The dialog box must provide options for the
user to set the various advanced operating modes of the device. If
DialogBox returns IDOK, AdvancedSetUpDialog copies the complete print-job
information including all the user's input to lpDevModeOut. Otherwise, it
must copy the complete contents of lpDevModeIn to lpDevModeOut.
 
Although AdvancedSetUpDialog and ExtDeviceMode may display similar dialog
boxes, these functions are not identical. In particular,
AdvancedSetUpDialog must not update or modify the current environment or
WIN.INI settings.
 
See Also
 
ExtDeviceMode, DEVMODE