Click to See Complete Forum and Search --> : problem in my Combobox


October 26th, 1999, 11:20 PM
well, I add strings to my combobox at the start up by using the AddString function but when I open the combobox, I see no content in it!!! That is very suprising....
Does anyone have an idea?
regards...

lesner
October 27th, 1999, 10:42 AM
At combo box you have 2 things to set:
a. the combo box size.
b. the combo box list size (at the resources-> dialog box) press the little arrow at the combo box (at the right side) you'll see the combo box list size - try to enlarge it.

if that does not work tell me please,
Les.

Sandrine
October 28th, 1999, 01:48 AM
When i worked with combo boxes, i had some problem and like you sometimes i did'nt see the content of the combo box...

What do you add to your combo box?
Two ways:
1- if you are created and added your character chain to the String table. (IDS_STRING1).

nIndex = m_ComboTechno.AddString (CString((LPCSTR) IDS_STRING1 )) ;
m_ComboTechno.SetItemData ( nIndex, IDS_STRING1 ); // Without SetItemData the string not appeared




2- if you add a CString ou char* variable, AddString works

nIndex = m_ComboTechno.AddString (CString(StrVar)) ; // char[30] StrVar
or
nIndex = m_ComboTechno.AddString (StrVar) ; // CString StrVar





Send some code if it doesn't work

HTH

Sandrine