typedef struct _OPTTYPE { WORD cbSize; BYTE Type; BYTE Flags; WORD Count; WORD BegCtrlID; POPTPARAM pOptParam; WORD Style; WORD wReserved[3]; DWORD dwReserved[3]; } OPTTYPE, *POPTTYPE;
The OPTTYPE structure describes the set of possible selections for an option item, and the selection method for the set.
Value |
Description |
TVOT_2STATES |
There are two option buttons for the item’s two possible states. |
TVOT_3STATES |
There are three option buttons for the item’s three possible states. |
TVOT_UDARROW |
The item has an up-down control. |
TVOT_TRACKBAR |
The item has a trackbar. |
TVOT_SCROLLBAR |
The item has a scroll bar. |
TVOT_LISTBOX |
The item has a list box. |
TVOT_COMBOBOX |
The item has a combo box. |
TVOT_EDITBOX |
The item has an edit box. |
TVOT_PUSH BUTTON |
The item has a push button. |
TVOT_CHKBOX |
The item has a check box. |
Flag |
Description |
OPTTF_TYPE_DISABLED |
Specifies that the array of OPTPARAM structures to which pOptParam points are disabled, meaning that none of the selectable items can be selected. |
OPTTF_NOSPACE_ |
Specifies that the CPSUI should not add a space character before the postfix string when combining it with the string specified in the pName field of the associated OPTITEM. For example, this bit could be set when the postfix string is “%”, so that the percent value and percent sign are displayed without a space between them. This bit is valid only when an associated OPTPARAM item specifies a postfix string. |
TVOT_Xxx |
Count |
TVOT_2STATES |
2 |
TVOT_3STATES |
3 |
TVOT_UDARROW |
2 |
TVOT_TRACKBAR |
3 |
TVOT_SCROLLBAR |
3 |
TVOT_LISTBOX |
n |
TVOT_COMBOBOX |
n |
TVOT_EDITBOX |
2 |
TVOT_PUSH BUTTON |
1 |
TVOT_CHKBOX |
1 |
The CPSUI uses BegCtrlID to manage the selections and initializations of an item associated with the caller’s dialog box. It uses BegCtrlID only when the OPTITEM is associated with a user-defined DLGTEMPLATE; that is, only when the DlgTemplateID field of the associated DLGPAGE structure is not a standard DP_STD_Xxx template ID.
The caller must organize control IDs based on Type as shown in the following table.
TVOT_Xxx |
Control ID Values |
TVOT_2STATES |
BegCtrlID = 2 States group box ID |
TVOT_3STATES |
BegCtrlID = 3 States group box ID |
TVOT_UDARROW |
BegCtrlID = Up-down arrow group box ID |
TVOT_TRACKBAR |
BegCtrlID = Track/Scroll bar group box ID |
TVOT_LISTBOX |
BegCtrlID = List/Combo box group box ID |
TVOT_EDITBOX |
BegCtrlID = Edit box group box ID |
TVOT_PUSH BUTTON |
BegCtrlID = Push button/Check box group box ID |
Value |
Description |
OTS_LBCB_SORT |
The CPSUI sorts the listbox or combobox selectable items in ascending order, based on the pData fields of the OPTPARAM structures to which pOptParam points. |
OTS_LBCB_ |
If Type is TVOT_LISTBOX and the selection set identified by this OPTTYPE structure is on a non-treeview user-defined property sheet page dialog box, the CPSUI interprets control for a combobox rather than a listbox. |
OTS_LBCB_ |
If Type is TVOT_COMBOBOX and the selection set identified by this OPTTYPE structure is on a non-treeview user-defined property sheet page dialog box, the CPSUI interprets control for a listbox rather than a combobox. |
OTS_LBCB_ |
The CPSUI adds Not Available to the list of selections in a listbox or combobox. The CPSUI sets the Sel field of the OPTITEM structure to -1 when a user selects None from the list. It also validates Sel during page initialization, setting any out-of-range values to -1. |
OTS_LBCB_ |
The CPSUI does not include icons in the listbox or combobox. By default, each item string in a listbox or combobox has a 16x16 icon placed in front of it. |
OTS_PUSH_ |
The CPSUI appends “Setup” to the push button’s text string. |
OTS_PUSH_ |
The CPSUI does not append “…” to the text string on a push button. |
OTS_PUSH_ENABLE_ALWAYS |
Regardless of permissions, the CPSUI allows the user to select the push button. The associated callback or dialog box procedure should display the current setting but not allow the user to modify it. |