Compartir a través de


Dialog Box Controls and Variable Types

You can use the Add Member Variable Wizard to add a member variable to a dialog box control created using MFC. The type of control for which you add the member variable determines the options that appear in the dialog box.

The following table describes all dialog box control types supported in MFC and the Dialog Editor, and their available types and values.

Control

Control type

Control variable type

Value variable type

Min/max values (value type only)

Animation control

SysAnimate32

CAnimateCtrl

None; control only

N/A

Button

BUTTON

CButton

None; control only

N/A

Check box

CHECK

CButton

BOOL

Min value/Max value

Combo box

COMBOBOX

CComboBox

CString

Max characters

Date time picker control

SysDateTimePick32

CDateTimeCtrl

CTime

Min value/max value

Edit box

EDIT

CEdit

CString, int, UINT, long, DWORD, float, double, BYTE, short, BOOL, COleDateTime, or COleCurrency

Min value/max value; some support max characters

Hotkey control

msctls_hotkey32

CHotKeyCtrl

None; control only

N/A

List box

LISTBOX

CListBox

CString

Max characters

List control

SysListView32

CListCtrl

None; control only

N/A

Month Calendar control

SysMonthCal32

CMonthCalCtrl

CTime

Min value/max value

Progress control

msctls_progress32

CProgressCtrl

None; control only

N/A

Rich Edit 2 control

RichEdit20A

CRichEditCtrl

CString

Max characters

Rich Edit control

RICHEDIT

CRichEditCtrl

CString

Max characters

Scroll bar (vertical or horizontal

SCROLLBAR

CScrollBar

int

Min value/max value

Slider control

msctls_trackbar32

CSliderCtrl

int

Min value/max value

Spin control

msctls_updown32

CSpinButtonCtrl

None; control only

N/A

Tab control

SysTabControl32

CTabCtrl

None; control only

N/A

Tree control

SysTreeView32

CTreeCtrl

None; control only

N/A

See Also

Tasks

Adding a Member Variable (Visual C++)