LONG DocumentProperties(hWnd, hPrinter, pDeviceName, pDevModeOutput, pDevModeInput, fMode) | |||
HWND hWnd; | |||
HANDLE hPrinter; | |||
LPSTR pDeviceName; | |||
PDEVMODE pDevModeOutput; | |||
PDEVMODE pDevModeInput; | |||
DWORD fMode; |
The DocumentProperties function allows an application to configure the Settings of a Printer. This function will call the correct Printer Driver associated with the Printer specified by hPrinter, and the Driver will display a Dialog Box to allow the User to configure the Printer.
hWnd
Specifies the Parent Window Handle that the Dialog box should be created with.
hPrinter
Indicates the open Printer handle that this function is to be performed upon. This Handle is obtained with the OpenPrinter API.
pDeviceName
This is a pointer to a NULL terminated string specifying the Printer Driver DeviceName that the Driver will use to retrieve the correct configuration information. Note: This value could be retrieved by the Driver given the handle of the Printer with the GetPrinter function. The DeviceName is supplied here as a performance enhancement.
pDevModeOutput
This value is a Pointer to a buffer that will contain the new DEVMODE structure. The size of this buffer is determined by calling the AdvancedDocumentProperties with pDevModeOutput set to NULL.
pDevModeInput
This value is a Pointer to a buffer that contains the DEVMODE structure from which the dialog box is initialized.
fMode
The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.