Dialog Box Controls and Variable Types

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at 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.

ControlControl typeControl variable typeValue variable typeMin/max values (value type only)
Animation controlSysAnimate32CAnimateCtrlNone; control onlyN/A
ButtonBUTTONCButtonNone; control onlyN/A
Check boxCHECKCButtonBOOLMin value/Max value
Combo boxCOMBOBOXCComboBoxCStringMax characters
Date time picker controlSysDateTimePick32CDateTimeCtrlCTimeMin value/max value
Edit boxEDITCEditCString, int, UINT, long, DWORD, float, double, BYTE, short, BOOL, COleDateTime, or COleCurrencyMin value/max value; some support max characters
Hotkey controlmsctls_hotkey32CHotKeyCtrlNone; control onlyN/A
List boxLISTBOXCListBoxCStringMax characters
List controlSysListView32CListCtrlNone; control onlyN/A
Month Calendar controlSysMonthCal32CMonthCalCtrlCTimeMin value/max value
Progress controlmsctls_progress32CProgressCtrlNone; control onlyN/A
Rich Edit 2 controlRichEdit20ACRichEditCtrlCStringMax characters
Rich Edit controlRICHEDITCRichEditCtrlCStringMax characters
Scroll bar (vertical or horizontalSCROLLBARCScrollBarintMin value/max value
Slider controlmsctls_trackbar32CSliderCtrlintMin value/max value
Spin controlmsctls_updown32CSpinButtonCtrlNone; control onlyN/A
Tab controlSysTabControl32CTabCtrlNone; control onlyN/A
Tree controlSysTreeView32CTreeCtrlNone; control onlyN/A

Adding a Member Variable

Show: