CComboBox

The CComboBox class encapsulates the functionality of a Windows combo box., which is a control that combines a list box with either an edit control or static control.

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

Remarks

Because Windows CE doesn't support owner-drawn combo boxes, you can't specify ODS_COMBOBOXEDIT in the itemState field of a DRAWITEMSTRUCT structure, or specify ODT_COMBOBOX in the CtlType field of a DRAWITEMSTRUCT or a MEASUREITEMSTRUCT structure.

You can use the following FrameWnd member functions to manipulate combo boxes in a Windows CE application's command bar.

Use CFrameWnd::AddComboBoxString to add a string to a combo box in the command bar.

Use CFrameWnd::GetComboCount to retrieve the number of items in the list-box part of a combo box in the command bar.

Use CFrameWnd::GetComboCurSel to determine which item is selected in a command bar combo box.

Use CFrameWnd::InsertComboBox to insert a combo box into the command bar.

Use CFrameWnd::SetComboCurSel to select a string in the list box part of a combo box in the command bar.

See Also

CComboBox Member Functions, Control Classes, CWnd, CButton, CEdit, CListBox, CScrollBar, CStatic, CDialogCFrameWnd::AddComboBoxString CFrameWnd::GetComboCount, CFrameWnd::GetComboCurSel, CFrameWnd::InsertComboBox, CFrameWnd::SetComboCurSel, DRAWITEMSTRUCT, MEASUREITEMSTRUCT