Reputation: 1016
I am trying populate a combo box in MFC application with no luck, I have tried all the methods available on internet but none seems to work for me, if I try to enter the values using data option in property windows like "value 1; value 2" only value 2 displays in combo box, if I try to add it using
comboxbox.AddString("value 1");
I get
left side of AddString must have class/union/struct.
I am using Visual Studio 2008.
Upvotes: 7
Views: 19300
Reputation: 4663
Create a control variable for the combobox and call m_ctrlCombo.AddString(_T("My String"));
Another thing you need to do is open your dialog in resource editor select the combo box, click the arrow of the combobox and now you will see the combobox will be highlighted now drag it using your mouse downwards.
Upvotes: 0