Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with ComboBox!!

Status
Not open for further replies.

ceodav

Programmer
Feb 21, 2003
106
IT
hi,
i'm not able to control a simple combobox.
when i launch the program nothing is written inside.

i mean:
CComboBox *cb_lista_commesse=(CComboBox*) GetDlgItem (IDC_COMBO1);

cb_lista_commesse->AddString("hello");
or
cb_lista_commesse->InsertString(0, "Hello");

nothing happen;

does anyone know how to do it?

thanks
ceodav
 
looks like nothing wrong with your code.
maybe you did not enlarge the drop list box in the design time. So that when you click on the arrow of the combo box you cannot see the items in the list.
 
It works for me, so I can't really see what is wrong with your code. How do you know it doesn't work, what errors (if any) are you getting. And how big is the DropDown List section of the Box?

If you click on the down arrow of the list do you get a black line? If you do you need to set the height of the list. Do this by using the resource editor and clicking the down arrow of the control, and drag the botton line down the screen.

HTH


William
Software Engineer
ICQ No. 56047340
 
Actually i don't get any error.
When i clic in the down arrow i dont't see anything but there is no space for any item...maybe do i have to set a number of possible item?
 
This is what we expected.

Well if you see my post above it will tell you how to sort that. Open the Dialog in the resource editor, click the arrow head (on the right) of the control and drag the thick white/blue line at the bottom down the page.

HTH



William
Software Engineer
ICQ No. 56047340
 
this is a very good trick!
thanks now it works!
after 1 crazy day ....thanks i didn't know this feature.
i'm not an expert you know....
thank you very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top