CPSUICBPARAM structure

The CPSUICBPARAM structure is used as the input parameter to _CPSUICALLBACK-typed callback functions.

Syntax

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;

Members

cbSize

CPSUI-supplied size, in bytes, of the CPSUICBPARAM structure.

Reason

CPSUI-supplied value indicating the reason it is calling the callback function. This can be one of the following values:

CPSUICB_REASON_ABOUT

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.

CPSUICB_REASON_APPLYNOW

The user has clicked on the page's Apply or OK button, and CPSUI has received a PSN_APPLY notification message (described in the Microsoft Windows SDK documentation). 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.

CPSUICB_REASON_DLGPROC

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.

CPSUICB_REASON_ECB_CHANGED

The option identified by pCurItem is an extended check box, and the user has changed the box's state.

CPSUICB_REASON_EXTPUSH

The option identified by pCurItem is an extended push button, and the user has clicked on the button.

CPSUICB_REASON_ITEMS_REVERTED

The user clicked on the page's Undo button, and CPSUI has reverted all selections to their original values.

CPSUICB_REASON_KILLACTIVE

The property sheet page is about to lose activation, and CPSUI has received a PSN_KILLACTIVE notification message (described in the Windows SDK documentation). CPSUI sets pCurItem to the value contained in pOptItem, and sets pOldSel to point to the COMPROPSHEETUI structure.

CPSUICB_REASON_OPTITEM_SETFOCUS

The option identified by pCurItem has received input focus.

CPSUICB_REASON_PUSHBUTTON

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.

CPSUICB_REASON_SEL_CHANGED

The user has changed the selected value for the option pointed to by pCurItem.

CPSUICB_REASON_SETACTIVE

The property sheet page is about to become active, and CPSUI has received a PSN_SETACTIVE notification message (described in the Windows SDK documentation). CPSUI sets pCurItem to the value contained in pOptItem, and sets pOldSel to point to the COMPROPSHEETUI structure.

hDlg

CPSUI-supplied handle to the currently active dialog box.

pOptItem

CPSUI-supplied pointer to an array of OPTITEM structures. This is the same pointer that the application previously supplied in a COMPROPSHEETUI structure.

cOptItem

CPSUI-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.

Flags

CPSUI-supplied flags. This is the same set of flags that the application previously supplied in a COMPROPSHEETUI structure.

pCurItem

CPSUI-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.

DUMMYUNIONNAME

DUMMYUNIONNAME.OldSel

If 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.pOldSel

If 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.

UserData

CPSUI-supplied user data. This is the same value that the application previously supplied in a COMPROPSHEETUI structure.

Result

Result 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.

Requirements

   
Header compstui.h (include Compstui.h)