Anfängerfrage: ComboBox leeren
-
Hallo,
wie kann ich eine gefüllte ComboBox leeren?
ich hab es so probiert:
m_Combo.AddString("test_a"); m_Combo.AddString("test_b"); m_Combo.AddString("test_c"); m_Combo.Clear(); int i = m_Combo.GetCount();
in i sollte jetzt 0 stehen, aber da steht 3 und die Einträge werden auch angezeigt.
Bin um jede Hilfe dankbar
-
MSDN lesen. Dort steht's.Genau wie CComboBox::Clear :
void Clear( );
Remarks
Deletes (clears) the current selection, if any, in the edit control of the combo box.
To delete the current selection and place the deleted contents onto the Clipboard, use the Cut member function.
-
ResetContent();
-
Hallo,
Danke, das habe ich gesucht, es funktioniert wunderbar.