Previous Next

DOCUMENTPROPERTYHEADER

The DOCUMENTPROPERTYHEADER structure is used as an input parameter to a printer interface DLL's DrvDocumentPropertySheets function.

typedef struct _DOCUMENTPROPERTYHEADER {
  WORD    cbSize;
  WORD    Reserved;
  HANDLE  hPrinter;
  LPTSTR  pszPrinterName;
  PDEVMODE  pdmIn;
  PDEVMODE  pdmOut;
  DWORD   cbOut;
  DWORD   fMode;
} DOCUMENTPROPERTYHEADER, *PDOCUMENTPROPERTYHEADER;

Members

cbSize
Size, in bytes, of the DOCUMENTPROPERTYHEADER structure.
Reserved
Reserved. Must be zero.
hPrinter
Printer handle.
pszPrinterName
Pointer to a NULL-terminated string representing the printer's name.
pdmIn
Pointer to an input DEVMODE structure that the DrvDocumentPropertySheets function should copy into the printer interface DLL's internal DEVMODE structure (before the property sheet is displayed, if applicable). If DM_IN_BUFFER or DM_MODIFY is not set in fMode, this pointer is NULL.
pdmOut
Pointer to an output DEVMODE structure into which the DrvDocumentPropertySheets function should copy the printer interface DLL's internal DEVMODE contents (after the property sheet has been displayed, if applicable). If DM_OUT_BUFFER or DM_COPY is not set in fMode, this pointer is NULL.
cbOut
Specifies the size, in bytes, of the buffer to which pdmOut points. See the Comments section for more information.
fMode
One or more of the bit flags listed in the following table. (Flags are defined in wingdi.h and winddiui.h.)
Flag Definition
No flags set (that is, fMode is 0). The DrvDocumentPropertySheets function should return the size, in bytes, of its DEVMODE structure, including all public and private members, in the cbOut member.
DM_ADVANCED If set, the DrvDocumentPropertySheets function should only create the Advanced document page.
If not set, the DrvDocumentPropertySheets function should create both the Page Setup and Advanced document pages.

(See the description of the pDlgPage member of the COMPROPSHEETUI structure.)

DM_IN_BUFFER or
DM_MODIFY
The caller has supplied a DEVMODE structure pointer in pdmIn, and the DrvDocumentPropertySheets function should update its internal DEVMODE structure to reflect the contents of the supplied DEVMODE.
DM_IN_PROMPT or
DM_PROMPT
The DrvDocumentPropertySheets function should create its property sheet pages.
(This flag is never set if the DrvDocumentPropertySheets function's pPSUIInfo parameter is NULL.).
DM_NOPERMISSION The printer interface DLL's _CPSUICALLBACK-typed callback should not allow the user to modify properties on the displayed property sheet pages.
DM_OUT_BUFFER or
DM_COPY
The caller has supplied a DEVMODE structure pointer in pdmOut, and the DrvDocumentPropertySheets function should copy the contents of its internal DEVMODE structure into the supplied DEVMODE.
DM_USER_DEFAULT Not used
DM_OUT_DEFAULT or
DM_UPDATE
Not used

Headers

Declared in winddiui.h. Include winddiui.h.

Comments

The input value in the cbOut member is not necessarily equal to the size of the buffer pointed to by the pdmOut member. For example, when the pPSUInfo parameter of the DrvDocumentPropertySheets function is NULL, and if either the fMode member of the DOCUMENTPROPERTYHEADER structure is zero, or the pdmOut member of the same structure is NULL, a driver should write the total size of the printer's DEVMODE structure (including the public and private structure members) in the cbOut member. In such a case, a driver should treat the cbOut member as a "write-only" member. The plotter sample that ships with this DDK demonstrates how to use the cbOut member correctly.

See Also

DrvDocumentPropertySheets, COMPROPSHEETUI, DEVMODE