Click here to Skip to main content
15,884,077 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hy all pro
I want to create an application by win32 project in visual studio 2010 ( C++.net ) .
I want to add a Combo box to Form an add many item to this .
how I add item to combo box ?
thank you
Posted
Comments
pasztorpisti 11-Sep-12 9:03am    
This is too simple question to be posted here. Use google to find answers to such trivial questions: here is the solution

1 solution

Use the CB_ADDSTRING[^] message.

With MFC, use the CComboBox::AddString[^] function.
 
Share this answer
 
Comments
Mohibur Rashid 11-Sep-12 7:24am    
i think he meant managed c++
Jochen Arndt 11-Sep-12 7:34am    
You are probably right. Then he should use the ComboBox.Items.Add method.
khosro goudarzi 11-Sep-12 7:33am    
I used the these codes but when I use these codes, they say : AddString must point to struct/class/union . pleas help me .
Jochen Arndt 11-Sep-12 7:38am    
Please show a short code example (creation of your ComboBox). You may do this by editing your question using the 'Improve question' link.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900