Share via


CComboBox::Clear

Deletes (clears) the current selection, if any, in the edit control of the combo box.

void Clear( );

Remarks

To delete the current selection and place the deleted contents onto the Clipboard, use the Cut member function.

Example

// Delete all of the text from the combo box's edit control.
m_MyComboBox.SetEditSel(0, -1);
m_MyComboBox.Clear();

Requirements

Header: afxwin.h

See Also

Reference

CComboBox Class

Hierarchy Chart

CComboBox::Copy

CComboBox::Cut

CComboBox::Paste

WM_CLEAR