i've a little comboBox, and i want to fill it with 6 entries... . i wrote this code:
CComboBox* dropdownList = ((CComboBox*)GetDlgItem(IDC_PROGRAMDROPDOWN));
dropdownList->Clear();
dropdownList->AddString(L"test");
dropdownList->AddString(L"test2");
dropdownList->InsertString(2,L"test3");
dropdownList->InsertString(3,L"test4");
dropdownList->InsertString(4,L"test5");
As you can see I tried AddString()
, and InsertString()
. both with no effect. I also tried it just with AddString()
which should be the correct way at initializing it.
But, my combobox is empty. I already debugged it, and this lines are hit but with no effect.
Do you have any idea?
OnInitDialog
, right? Or no? – Ajay