Hi,
I bulid a dialog box and add a combo box (m_try) by resource editor. And add this code in dialog's OnInitDialog():
m_try.AddString("Hello");
But the string "Hello" can't appear in the listbox.
Now I change the way to add this combo box: I type "CComboBox m_try" by myself in dialog class amd use m_try.Create() to create this combo box.
Now m_try.AddString("Hello") works well.
What's difference between the tow way? Thanks!