OPTTYPE

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.

Members

cbSize

Size in bytes of this structure.

Type

Specifies the type of the option item. The CPSUI uses Type to determine how to lay out the OPTPARAM selections associated with an OPTITEM option item. This field must be one of the following predefined TVOT_Xxx values.

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.

Flags

Bitmask containing a bitwise OR of any of the following values.

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_
BEFORE_POSTFIX
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.


Count

Specifies the number of OPTPARAM structures to which pOptParam points. This value depends on the value of Type, and must be set as shown in the following table.

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

BegCtrlID

Specifies the start control window ID. Each OPTITEM has a predefined number of control window IDs associated with it. This field must be set to zero if the caller is using the CPSUI's standard pages.

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
BegCtrlID+1 = 2 States static title text ID
BegCtrlID+2 = State 1 radio button ID
BegCtrlID+3 = State 1 icon control ID
BegCtrlID+4 = State 2 radio button ID
BegCtrlID+5 = State 2 icon control ID
BegCtrlID+6 = Extended check box/push button control ID
BegCtrlID+7 = Extended check box/push button icon control ID
TVOT_3STATES BegCtrlID = 3 States group box ID
BegCtrlID+1 = 3 States static title text ID
BegCtrlID+2 = State 1 radio button ID
BegCtrlID+3 = State 1 icon control ID
BegCtrlID+4 = State 2 radio button ID
BegCtrlID+5 = State 2 icon control ID
BegCtrlID+6 = State 3 radio button ID
BegCtrlID+7 = State 3 icon control ID
BegCtrlID+8 = Extended check box/push button control ID
BegCtrlID+9 = Extended check box/push button icon control ID
TVOT_UDARROW BegCtrlID = Up-down arrow group box ID
BegCtrlID+1 = Up-down arrow static title text ID
BegCtrlID+2 = Up-down arrow edit box ID
BegCtrlID+3 = Up-down arrow icon control ID
BegCtrlID+4 = Up-down arrow postfix static text ID
BegCtrlID+5 = Up-down arrow help static text ID
BegCtrlID+6 = Up-down arrow's arrow ID
BegCtrlID+7 = Extended check box/push button control ID
BegCtrlID+8 = Extended check box/push button icon control ID
TVOT_TRACKBAR
TVOT_SCROLLBAR
BegCtrlID = Track/Scroll bar group box ID
BegCtrlID+1 = Track/Scroll bar static title text ID
BegCtrlID+2 = Horizontal Track/Scroll bar ID
BegCtrlID+3 = Track/Scroll bar icon control ID
BegCtrlID+4 = Track/Scroll bar low range text control ID
BegCtrlID+5 = Track/Scroll bar high range text control ID
BegCtrlID+6 = Track/Scroll bar postfix ID
BegCtrlID+7 = Extended check box/push button control ID
BegCtrlID+8 = Extended check box/push button icon control ID
TVOT_LISTBOX
TVOT_COMBOBOX
BegCtrlID = List/Combo box group box ID
BegCtrlID+1 = List/Combo box static title text ID
BegCtrlID+2 = List/Combo box ID
BegCtrlID+3 = List/Combo box icon control ID
BegCtrlID+4 = Extended check box/push button control ID
BegCtrlID+5 = Extended check box/push button icon control ID
TVOT_EDITBOX BegCtrlID = Edit box group box ID
BegCtrlID+1 = Edit box static title text ID
BegCtrlID+2 = Edit box ID
BegCtrlID+3 = Edit box icon control ID
BegCtrlID+4 = Edit box postfix static text ID
BegCtrlID+5 = Edit box help static text ID
BegCtrlID+6 = Extended check box/push button control ID
BegCtrlID+7 = Extended check box/push button icon control ID
TVOT_PUSH BUTTON
TVOT_CHKBOX
BegCtrlID = Push button/Check box group box ID
BegCtrlID+1 = Push button/Check box static title text ID (not used by CPSUI)
BegCtrlID+2 = Push button/Check box ID
BegCtrlID+3 = Push button/Check box icon control ID
BegCtrlID+4 = Extended check box/push button control ID
BegCtrlID+5 = Extended check box/push button icon control ID

pOptParam

Pointer to an array of OPTPARAM structures describing the selections that belong to an OPTITEM item's set.

Style

Specifies the style of the group box for an option item. OTS_LBCB_Xxx styles are applied only to the TVOT_LISTBOX and TVOT_COMBOBOX item types; OTS_PUSH_Xxx styles are applied only to TVOT_PUSH BUTTON types. This field can be a bitwise OR of the following values.

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_
PROPPAGE_LBUSECB
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_
PROPPAGE_CBUSELB
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_
INCLUDE_ITEM_NONE
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_
NO_ICON16_IN_ITEM
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_
INCLUDE_SETUP_TITLE
The CPSUI appends "Setup" to the push button's text string.
OTS_PUSH_
NO_DOT_DOT_DOT
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.

wReserved[3]

Reserved; these fields must be set to zero.

dwReserved[3]

Reserved; these fields must be set to zero.