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.
CComboBox* pComboBox = (CComboBox*)GetDlgItem(YOUR_COMBO_ID);
pComboBox->AddString( _T( "Value" ) );
pComboBox->AddString( _T( "Value" ) );
To know what _T means: Read this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With