#define CPSFUNC_GET_HPSUIPAGES 10
COMPROPSHEETUI data structure is used when calling common UI to display dialog box of properties pages. Size - Must be sizeof (COMPROPSHEETUI) Flags - can be one or more of following CPSUIF_UPDATE_PERMISSION Specified the any valid pOptItem items are changeable by the user. CPSUIF_ICONID_AS_HICON If this flag is set then IconID DWORD field is treated as a handle to the icon rather then the resource ID CPSUIF_ABOUT_CALLBACK If this flag bit is set, then when user hit 'About...' button in the treeview tab, it will call the callback function with a reason of CPSUICB_REASON_ABOUT, and callback MUST handle the about which pop-up dialog box to show user the information about the caller and OPTITEMs. If this bit is not set then common UI will call the ShellAbout() with formatted caller Name and pOptItemName with version numbers. hInstCaller - the caller's handle to its instance. Commom UI use this handle to load caller's icon and other resources. pCallerName - Pointer to the caller's NULL terminated caller's name, most time this is driver's name, such as 'Postscript Driver' UserData - a 32-bit number used by the caller and common UI will not modify it. this 32-bit number is passed back to the caller durning the callback function pHelpFile - specified a standard microsoft help file (path/file) for using in the common UI. in OPTITEM specified HelpIndex for help in each item. pfnCallBack - Pointer to _CPSUICALLBACK callback function. Common UI only callback to the caller if an OPTIF_CALLBACK is set OPTITEM data structure's flag fields and the item selection is changed by the user. pOptItem - Pointer to array of OPTITEM structure to be displayed by the common UI pDlgPage - Pointer to array of DLGPAGE structure to describe each property sheet page infomation, the following are the standard common ui DLGPAGEs. When specified CPSUI_PDLGPAGE_xxxx, the common UI will automatically modify DlgPageIdx field in the OPTITEM, caller must set the iStartPage correctly. CPSUI_PDLGPAGE_DOCPROP specified this a common ui standard document property sheets. This includes two property sheets, 1) Page Setup 2) Advance (TreeView) CPSUI_PDLGPAGE_ADVDOCPROP Specified this is a treeview page only UI provided by the common UI, this only has one treeview page with tab of 'Advance' CPSUI_PDLGPAGE_PRINTERPROP Specified this is a common UI standard printer property sheet. This only has one treeview page with tab of 'Device Options' CPSUI_PDLGPAGE_TREEVIEWONLY Specified this is a treeview page only UI provided by the common UI, this only has one treeview page cOptItem - Count of OPTITEM pointed by the pOptItem above cDlgPage - Count of DLGPAGE pointed by the pDlgPage. If pDlgPage is one of the CPSUI_PDLGPAGE_xxxx then this field is ignored by the common UI. IconID - This is the icon identifier, which can be a common strandard IDI_CPSUI_xxx icon ID, caller's own icon resource ID, or a handle to the caller defined icon if CPSUIF_ICONID_AS_HICON flag is set, in any case if the IconID is zero then it indicated no icon. pOptItemName - Pointer to the pOptItem data NULL terminated name, most time this is device name, such as 'HP 4si' CallerVersion - Version for the caller, the HIBYTE(CallerVersion) is the major version, and LOBYTE(CallerVersion) is the minor version, such as 0x310 display as 3.16, 0x3ff display as 3.255 and 0x30a display as 3.10 OptItemVersion - Version for the OPTITEM's data, the HIBYTE(OptItemVersion) is the major version, and LOBYTE(OptItemVersion) is the minor version, such as 0x310 display as 3.16, 0x3ff display as 3.255 and 0x30a display as 3.10. dwReserved[4] - reserved fields, must be 0 ** pTitlee and TitleBarIcon only used if CommonPrinterPropSheetUI() is the last one the Property sheet UI chain and call the PropertySheet()