Click here to Skip to main content
15,923,689 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am beginner in C++, I am using Visual Studio and I would like to create combo boxes which will have very small with, but if I will click on them they will expand so all items can be seen. I found a topic here on "autosize" but that was .NET and I do not want to be depended on .NET framework. So can you show me how to do it? Lets start with combobox containing these items: "all", "barracks","blacksmith","university","monastery", so I would set the initial width to 23px, so the first item "all" will be selected and visible.
Posted

1 solution

you got to do it on your own. C++ hasnt the comfort of .NET but allows to implement much things. You must implement message handler for some the the Control Messages and some Control Notifications.

Looks like here is an interesting article about Custom Comboboxes.
 
Share this answer
 
Comments
[no name] 5-Jul-15 13:23pm    
Thanks for answer, unfortunately I have no MFC so I cannot follow the project.

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