This documentation is archived and is not being maintained.

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

// The pointer to my combo box.
extern CComboBox* pmyComboBox;

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

See Also

CComboBox Overview | Class Members | Hierarchy Chart | CComboBox::Copy | CComboBox::Cut | CComboBox::Paste | WM_CLEAR

Show: