DOCUMENTPROPERTYHEADER

typedef struct _DOCUMENTPROPERTYHEADER {

WORD cbSize;

WORD Reserved;

HANDLE hPrinter;

LPTSTR pszPrinterName;

PDEVMODE pdmIn;

PDEVMODE pdmOut;

DWORD cbOut;

DWORD fMode;

} DOCUMENTPROPERTYHEADER, *PDOCUMENTPROPERTYHEADER;

The DOCUMENTPROPERTYHEADER structure is passed to DrvDocumentPropertySheets as the lParam parameter.

Members

cbSize

Size of this structure, in bytes.

Reserved

Reserved. Must be set to zero.

hPrinter

Handle to the printer whose configuration data is being queried or set.

pszPrinterName

Pointer to a null-terminated string that specifies the name of the printer.

pdmIn

Pointer to the input DEVMODE structure that contains the configuration data to be used by the driver to initialize the controls of the dialog box. This parameter can be null.

pdmOut

Pointer to an output DEVMODE structure in which the final printer configuration data is returned. This parameter can be null.

cbOut

Specifies the size, in bytes, of the buffer to which pdmOut points.

fMode

Bitmask specifying the operation(s) to be performed by DrvDocumentPropertySheets. If this member is zero, the driver should simply return the size, in bytes, of its DEVMODE structure. Otherwise, this parameter can be one or more of the following values:

Flag Meaning
DM_IN_BUFFER The buffer to which pdmIn points is valid. Before doing anything else, the driver should merge its current settings with the settings in the input DEVMODE, updating only those members specified in the dmField member of the input DEVMODE. In cases of conflict during the merge, the driver should use the setting provided by the input DEVMODE.

This value is also defined as DM_MODIFY.

DM_IN_PROMPT The buffer to which pdmIn points is valid. The driver should present its Document Properties property sheet using the default values specified in the input DEVMODE. The driver should update its DEVMODE structure to those values specified by the user through the UI. The driver should ignore this field when pPSUIInfo is null, because no dialog box interaction should occur.

This value is also defined as DM_PROMPT.

DM_OUT_BUFFER The driver should write its current print settings, including private data, in the buffer to which pdmOut points. If the DM_OUT_BUFFER bit is not set, pdmOut can be null.

This value is also defined as DM_COPY.

DM_ADVANCED DrvDocumentPropertySheets has been called as a result of an application call to the Win32 AdvancedDocumentProperties function. This bit is set by the spooler.
DM_NOPERMISSION The driver should not allow the user to change any items on the property sheet. This bit is set by the spooler.
DM_USER_DEFAULT DrvDocumentPropertySheets was called by the Printer Folder as a result of the user selecting "Document Properties".