Click to See Complete Forum and Search --> : CComboBox in CDialogBar


Andi
June 11th, 1999, 12:14 AM
Hi there,
the problem is: how can I select an item of a ComboBox at the start(!) (e.g. "Hallo" should be written at the beginning). No problem if the ComboBox is in a Dialog, but
what have I to do if the ComboBox is in a DialogBar...?

Thanx, ANDI

Andi
June 11th, 1999, 12:55 AM
...sorry, I found the solution 5 minutes later by myself......but if anyone else wants to know:

Write in your CMainFrame OnCreate():
CComboBox* aBox = (CComboBox*)m_wnd_a_DialogBar.GetDlgItem(ID_.....);
aBox->SetCurSel(0);

Thanx at all,
ANDI