Available Indexes for Each Dialog Control

The available indexes and defaults for each of the controls are listed in the following table:

Dialog Controls and Their Indexes

Control Type Integer Index Name Logical Index Name Character Index Name Subroutine Index Name
ActiveX control DLG_IDISPATCH DLG_ENABLE    
Button   DLG_ENABLE DLG_TITLE DLG_CLICKED
Check box   DLG_STATE (default)
DLG_ENABLE
DLG_TITLE DLG_CLICKED
Combo box DLG_NUMITEMS
Sets or returns the total number of items in a list
DLG_ENABLE Use DLG_STATE, DLG_ADDSTRING, or an index:

DLG_STATE
By default, sets or returns the text of the selected item or first item in the list

DLG_ADDSTRING
Used with DLGSETCHAR to add a new item. It automatically increments DLG_NUMITEMS.

An index, 1 to n
Sets or returns the text of a particular item

DLG_SELCHANGE (default)
DLG_DBLCLICK
DLG_CHANGE
DLG_UPDATE
Drop-down list box Use DLG_NUMITEMS or DLG_STATE:

DLG_NUMITEMS (default)
Sets or returns the total number of items in a list

DLG_STATE
Sets or returns the index of the selected item

DLG_ENABLE Use DLG_STATE, DLG_ADDSTRING, or an index:

DLG_STATE
By default, sets or returns the text of the selected item or first item in the list, or you can include an index, 1 to n, to set or return indicates the text of a particular item

DLG_ADDSTRING
Used with DLGSETCHAR to add a new item. It automatically increments DLG_NUMITEMS.

DLG_SELCHANGE (default)
DLG_DBLCLICK
Edit box DLG_TEXTLENGTH (default)
Sets or returns the length of the text in the edit box.

DLG_POSITION
Sets or returns the cursor position

DLG_ENABLE DLG_STATE DLG_CHANGE (default)
DLG_UPDATE
DLG_GAINFOCUS
DLG_LOSEFOCUS
Group box   DLG_ENABLE DLG_TITLE  
List box Use DLG_NUMITEMS or an index:

DLG_NUMITEMS
Sets or returns the total number of items in a list

An index, 1 to n
Determines which list items have been selected and their order

DLG_ENABLE Use DLG_STATE, DLG_ADDSTRING, or an index:

DLG_STATE
By default, returns the text of the first selected item

DLG_ADDSTRING
Used with DLGSETCHAR to add a new item. It automatically increments DLG_NUMITEMS.

An index, 1 to n
Sets or returns the text of a particular item

DLG_SELCHANGE (default)
DLG_DBLCLICK
Picture   DLG_ENABLE    
Progress bar DLG_POSITION (default)
DLG_RANGEMIN
DLG_RANGEMAX
DLG_ENABLE    
Radio button   DLG_STATE (default)
DLG_ENABLE
DLG_TITLE DLG_CLICKED
Scroll bar DLG_POSITION (default)
DLG_RANGEMIN
DLG_RANGEMAX
DLG_BIGSTEP
DLG_ENABLE   DLG_CHANGE
Slider DLG_POSITION (default)
DLG_RANGEMIN
DLG_RANGEMAX
DLG_SMALLSTEP
DLG_BIGSTEP
DLG_TICKFREQ
DLG_ENABLE   DLG_CHANGE
Spin controls DLG_POSITION (default)
DLG_RANGEMIN
DLG_RANGEMAX
DLG_ENABLE   DLG_CHANGE
Static text DLG_ENABLE DLG_TITLE  
Tab control Use DLG_NUMITEMS (default), DLG_STATE, or an index:

DLG_NUMITEMS
Sets or returns the total number of tabs

DLG_STATE
Sets or returns the currently selected tab

An index, 1 to n
Sets or returns the dialog name of the dialog box associated with a particular tab

DLG_ENABLE Use DLG_STATE or an index:

DLG_STATE
By default, sets or returns the currently selected tab

An index, 1 to n
Sets or returns the text of a particular Tab

DLG_SELCHANGE (default)
DLG_SELCHANGING

For an overview on control indexes, see Control Indexes.