// compstui.h
typedef struct _CPSUICBPARAM {
WORD cbSize;
WORD Reason;
HWND hDlg;
POPTITEM pOptItem;
WORD cOptItem;
WORD Flags;
POPTITEM pCurItem;
union {
LONG OldSel;
LPTSTR pOldSel;
} DUMMYUNIONNAME;
ULONG_PTR UserData;
ULONG_PTR Result;
} CPSUICBPARAM, *PCPSUICBPARAM;
View the official Windows Driver Kit DDI referenceNo description available.
The CPSUICBPARAM structure is used as the input parameter to _CPSUICALLBACK-typed callback functions.
cbSizeCPSUI-supplied size, in bytes, of the CPSUICBPARAM structure.
ReasonCPSUI-supplied value indicating the reason it is calling the callback function. This can be one of the following values:
The user has clicked on the page's About button, and the application previously set the CPSUIF_ABOUT_CALLBACK flag in a COMPROPSHEETUI structure. CPSUI sets pCurItem to the value contained in pOptItem, and sets pOldSel to point to the COMPROPSHEETUI structure.
The user has clicked on the page's Apply or OK button, and CPSUI has received a PSN_APPLY notification message. CPSUI sets pCurItem to point to the option to which pOptItem points. It also sets OldSel to minus one to indicate that all valid changed option values should be applied now.
The option identified by pCurItem is a push button (TVOT_PUSHBUTTON option type), and the user has clicked on the button.
The push button option's OPTPARAM Style field is set to PUSHBUTTON_TYPE_DLGPROC.
The option identified by pCurItem is an extended check box, and the user has changed the box's state.
The option identified by pCurItem is an extended push button, and the user has clicked on the button.
The user clicked on the page's Undo button, and CPSUI has reverted all selections to their original values.
The property sheet page is about to lose activation, and CPSUI has received a PSN_KILLACTIVE notification message. CPSUI sets pCurItem to the value contained in pOptItem, and sets pOldSel to point to the COMPROPSHEETUI structure.
The option identified by pCurItem has received input focus.
The option identified by pCurItem is a push button (TVOT_PUSHBUTTON option type), and the user has clicked on the button.
The push button item's OPTPARAM Style field is set to PUSHBUTTON_TYPE_CALLBACK.
The user has changed the selected value for the option pointed to by pCurItem.
The property sheet page is about to become active, and CPSUI has received a PSN_SETACTIVE notification message. CPSUI sets pCurItem to the value contained in pOptItem, and sets pOldSel to point to the COMPROPSHEETUI structure.
hDlgCPSUI-supplied handle to the currently active dialog box.
pOptItemCPSUI-supplied pointer to an array of OPTITEM structures. This is the same pointer that the application previously supplied in a COMPROPSHEETUI structure.
cOptItemCPSUI-supplied number of OPTITEM structures in the array pointed to by pOptItem. This is the same number that the application previously supplied in a COMPROPSHEETUI structure.
FlagsCPSUI-supplied flags. This is the same set of flags that the application previously supplied in a COMPROPSHEETUI structure.
pCurItemCPSUI-supplied pointer to a member of the OPTITEM array pointed to by pOptItem. This array member represents the "current" option, which is the one for which the callback function was called.
DUMMYUNIONNAMEDefines the DUMMYUNIONNAME union.
DUMMYUNIONNAME.OldSelIf the Reason member contains CPSUICB_REASON_SEL_CHANGED, CPSUI sets this union to the previous contents of the OldSel/pOldSel member of the OPTITEM structure pointed to by pCurItem.
For all other Reason values, the contents of this union should be ignored.
DUMMYUNIONNAME.pOldSelIf the Reason member contains CPSUICB_REASON_SEL_CHANGED, CPSUI sets this union to the previous contents of the OldSel/pOldSel member of the OPTITEM structure pointed to by pCurItem.
For all other Reason values, the contents of this union should be ignored.
UserDataCPSUI-supplied user data. This is the same value that the application previously supplied in a COMPROPSHEETUI structure.
ResultResult value supplied by the _CPSUICALLBACK-typed callback function. By default, CPSUI sets this value to CPSUI_OK. After the callback function returns, CPSUI calls its ComPropSheet function with a function code of CPSFUNC_SET_RESULT, supplying the Reason member contents as the result value.
This member is used only if the Reason member is CPSUICB_REASON_APPLYNOW and the callback function does not return CPSUI_ACTION_NO_APPLY_EXIT.