// compstui.h
typedef struct _COMPROPSHEETUI {
WORD cbSize;
WORD Flags;
HINSTANCE hInstCaller;
LPTSTR pCallerName;
ULONG_PTR UserData;
LPTSTR pHelpFile;
_CPSUICALLBACK pfnCallBack;
POPTITEM pOptItem;
PDLGPAGE pDlgPage;
WORD cOptItem;
WORD cDlgPage;
ULONG_PTR IconID;
LPTSTR pOptItemName;
WORD CallerVersion;
WORD OptItemVersion;
ULONG_PTR dwReserved[4];
} COMPROPSHEETUI, *PCOMPROPSHEETUI;
View the official Windows Driver Kit DDI referenceNo description available.
The COMPROPSHEETUI structure is used as an input parameter to CPSUI's ComPropSheet function, if the function code is CPSFUNC_ADD_PCOMPROPSHEETUI. All structure members must be supplied by the caller of ComPropSheet.
cbSizeCaller-supplied size, in bytes, of the COMPROPSHEETUI structure.
FlagsOptional caller-supplied bit flags, as described in the following list:
If set, the page's callback function (pointed to by the structure's pfnCallback member), supports CPSUICB_REASON_ABOUT, so CPSUI will call the callback function if the user clicks on the page's About button. (CPSUI supplies an About button for each treeview root node.)
If set, the structure's IconID member contains an icon handle.
If not set, the IconID member contains an icon resource identifier.
If set, the page's option values can be modified by the user.
hInstCallerCaller-supplied module instance handle, received by the DLL's entry point function.
pCallerNameCaller-supplied pointer to a NULL-terminated text string representing the application's name. (For a printer interface DLL, this should be the driver's name, such as "PostScript Driver".)
UserDataOptional caller-supplied value, which CPSUI places in a CPSUICBPARAM structure's UserData member when calling the function pointed to by pfnCallBack.
pHelpFileCaller-supplied pointer to a NULL-terminated text string representing a path to a help file. For printer interface DLLs, this is typically the help file path obtained by calling GetPrinterDriver.
The help file is indexed by values contained in the HelpIndex member of OPTITEM structures.
pfnCallBackCaller-supplied pointer to a _CPSUICALLBACK-typed callback function, which CPSUI calls when a user modifies the page's option values.
Can be used only if pDlgPage identifies a CPSUI-supplied DLGPAGE structure, or if the DlgProc member of an application-supplied DLGPAGE structure is NULL.
pOptItemCaller-supplied pointer to an array of OPTITEM structures describing the page's options.
pDlgPageThis member specifies DLGPAGE structures that describe pages to be added to the property sheet. It can be either of the following:
A pointer to an array of DLGPAGE structures.
One of the pointers that is described in the following list. These pointers reference predefined DLGPAGE structures, supplied by CPSUI for use by printer interface DLLs.
Defines one treeview page whose tab reads Advanced. For use only by a DrvDocumentPropertySheets function.
CPSUI_PDLGPAGE_DOCPROP Defines three pages, whose tabs are Layout, Paper/Quality, and Advanced. The Advanced page is a treeview. For use only by a DrvDocumentPropertySheets function.
CPSUI_PDLGPAGE_PRINTERPROP Defines one treeview page whose tab reads Device Settings. For use only by a DrvDevicePropertySheets function.
CPSUI_PDLGPAGE_TREEVIEWONLY
Defines one treeview page.
cOptItemCaller-supplied number of OPTITEM structures pointed to by pOptItem.
cDlgPageCaller-supplied number of DLGPAGE structures pointed to by pDlgPage. Not used if pDlgPage specifies a predefined CPSUI_PDLGPAGE-prefixed structure.
IconIDCaller-supplied, can be one of the following:
An icon resource identifier. This can be application-defined, or it can be one of the CPSUI-supplied, IDI_CPSUI-prefixed icon resource identifiers.
An icon handle. If a handle is specified, CPSUIF_ICONID_AS_HICON must be set in the Flags member.
The specified icon is displayed in the root node of the property sheet page's treeview.
pOptItemNameCaller-supplied pointer to a NULL-terminated string to be displayed in the root node of the property sheet page's treeview. For printer interface DLLs, this string typically represents a printer device type, such as "HP 4si".
CallerVersionCaller-supplied version number, representing the calling application's current version. The high byte identifies the major version, and the low byte is the minor version. For example, a CallerVersion value of 0x310 specifies a caller version number of 3.16. The version number is displayed when a user clicks on a page's About button.
OptItemVersionCaller-supplied version number, representing the root-level option item's current version. For printer interface DLLs, this typically represents a printer device version. The high byte identifies the major version, and the low byte is the minor version. For example, an OptItemVersion value of 0x3ff specifies a caller version number of 3.255. The version number is displayed when a user clicks on a page's About button.
dwReservedReserved. This array must be set to zero.