typedef struct _OPTPARAM { WORD cbSize; BYTE Flags; BYTE Style; LPTSTR pData; DWORD IconID; LONG lParam; DWORD dwReserved[2]; } OPTPARAM, *POPTPARAM;
The OPTPARAM structure is used to describe each selectable entry in an option item’s list of selections.
Flag |
Description |
OPTPF_HIDE |
This selection is hidden from the user. |
OPTPF_DISABLED |
This selection is not available for a user to select. |
OPTPF_ICONID_AS_HICON |
The CPSUI interprets the IconID member as a handle to an icon rather than as a resource ID. |
OPTPF_OVERLAY_WARNING_ICON |
The CPSUI overlays its IDI_CPSUI_WARNING icon on the icon associated with this selection. |
OPTPF_OVERLAY_STOP_ICON |
The CPSUI overlays its IDI_CPSUI_STOP icon on the icon associated with this selection. |
OPTPF_OVERLAY_NO_ICON |
The CPSUI overlays its IDI_CPSUI_NO icon on the icon associated with this selection. |
OPTPF_USE_HDLGTEMPLATE |
The lParam member is a handle to a DLGTEMPLATE structure supplied by the original caller. |
Value |
Description |
PUSH BUTTON_TYPE_DLGPROC |
This push button causes the CPSUI to display a caller-specified dialog box. |
PUSH BUTTON_TYPE_CALLBACK |
This push button requires that the caller process the option item. |
PUSH BUTTON_TYPE_HTCLRADJ |
This push button causes the CPSUI to display a halftone color adjustment dialog box. |
PUSH BUTTON_TYPE_HTSETUP |
This push button causes the CPSUI to display a device halftone setup dialog box. |
Type |
Description |
TVOT_2STATES |
pOptParam[0]->pData points to the text string that describes State 1. |
TVOT_3STATES |
pOptParam[0]->pData points to the text string that describes State 1. |
TVOT_UDARROW |
pOptParam[0]->pData points to the text string for the selection postfix and icons. pOptParam[1]->pData points to the help line text above the control. |
TVOT_TRACKBAR |
pOptParam[0]->pData points to the text string for the selection postfix and icons. |
TVOT_LISTBOX |
pOptParam[0]->pData points to the text string for the first OPTPARAM. |
TVOT_EDITBOX |
pOptParam[0]->pData points to the text string for the selection postfix and icons. |
TVOT_PUSH BUTTON |
Depends on the value of Style. See the Comments section for details. |
TVOT_CHKBOX |
pOptParam[0]->pData points to the text string for the OPTPARAM. |
Type |
Description |
TVOT_2STATES |
The CPSUI ignores lParam. |
TVOT_3STATES |
The CPSUI ignores lParam. |
TVOT_UDARROW |
Specifies the high range of the up-down control. This value must be in the range of a 16-bit signed integer. |
TVOT_TRACKBAR |
Specifies the high range of the trackbar/scrollbar control. This value must be in the range of a 16-bit signed integer. |
TVOT_LISTBOX |
The CPSUI ignored lParam. |
TVOT_EDITBOX |
The CPSUI ignored lParam. |
TVOT_PUSH BUTTON |
Depends on the value of Style. See the Comments section for details. |
TVOT_CHKBOX |
The CPSUI ignored lParam. |
The OPTPARAM structure is used to describe each selectable entry in an option item’s list of selections.
When the caller has set the OPTPF_HIDE flag, the CPSUI does not display this selection in the selection list on the property sheet. If all of the selectable items associated with an option item are marked as hidden, then the CPSUI automatically hides the entire option item.
The OPTPF_HIDE flag is valid only when the treeview option type is one of TVOT_3STATES, TVOT_LISTBOX, or TVOT_COMBOBOX. If the Type field of an option item’s OPTTYPE structure is TVOT_3STATES and only two of the three states are specified as hidden, the CPSUI does not add the page and returns an error condition.
When the caller has set the OPTPF_DISABLED flag, the CPSUI displays this selection, but does not allow a user to select it. This flag is valid only when the treeview option type is one of TVOT_2STATES, TVOT_3STATES, TVOT_LISTBOX, or TVOT_COMBOBOX.
When the Type field of the associated OPTTYPE structure is TVOT_PUSH BUTTON, the pData and lParam fields depend on the value of Style, and are interpreted as shown in the following table.
Style |
pData and lParam |
PUSH BUTTON_ |
The pData field is a pointer to the caller’s dialog box function; the lParam field specifies the caller’s DIALOG resource template ID or DLGTEMPLATE handle, depending on the OPTPF_USE_HDLGTEMPLATE flag. |
PUSH BUTTON_ |
The pData field is a pointer to a callback of type _CPSUICALLBACK; the lParam field is not used. |
PUSH BUTTON_ |
The pData field is a pointer to a COLORADJUSTMENT structure; the lParam field is not used. |
PUSH BUTTON_ |
The pData field is a pointer to a DEVHTADJDATA structure; the lParam field is not used. |
The pData field must be supplied when Type is TVOT_CHKBOX and Style is one of CHKBOXS_FALSE_PDATA, CHKBOXS_NO_PDATA, CHKBOXS_OFF_PDATA, or CHKBOXS_NONE_PDATA.
If the treeview option type is not TVOT_PUSH BUTTON, the pData field is either a pointer to a null-terminated string that describes the selectable option item entry, or an integer value that specifies a string resource identifier. If pData specifies a resource identifier, its high-order word must be zero and its low-order word must contain the identifier.
When using resource IDs, the caller should use the standard IDS_CPSUI_Xxx values as often as possible for user interface consistency.