I have a combobox control in a dilog project, I link it to the class MFC CComboList, when I use try to fill it with the method AddString in the method InitDialog of my dialog project, I never have any items in the list.
maybe U have them there, but U didn't set the size of the extracted list box (by clicking the [v] arrow and dragging down). or is it functionable ok, whe the items are aded from resource editor ?
Try this:
1. Select the combo box in the dialog editor press ctrl+w. In the ClassWizard go to MemberVaribiles and to your combo assign a member variabile lets say m_xCombo which should be of type CComboBox(not CComboList).
2. Add line in InitDialog
m_xCombo.AddString("whatever"
3. Go in the dialog editor, press on the arrow of the combo and then drag down the rectagle to allow your combo elements to be viewed (default is none). drag it let's say for four items.
Hope this helps,
s-)
Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.