Jump to content
  • Advertisement
Sign in to follow this  
santonel

WIN32 API ComboBox Question

This topic is 4696 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I've created a combobox control programmatically using CreateWindowEx() and add to it by sending CB_ADDSTRING messages. The problem is that it doesnt pop down when you push the arrow button. I've done some searching on this and I guess it's because you have to set the dropdown height which is either very small or zero by default. In the resourcae editor you would simply resize it but how would you do it in code. Ive been looking through MSDN and found a CB_SETDROPDOWNWIDTH message but not one for height. What message do I send to set the drop down height?

Share this post


Link to post
Share on other sites
Advertisement
You set the combo dropdown list height by the normal window size. In CreateWindow pass the height you want of the combo plus the opened listbox. The combo's edit will always have a default height, the rest is used to determine the height of the listbox.

Share this post


Link to post
Share on other sites
Quote:
Original post by Endurion
You set the combo dropdown list height by the normal window size. In CreateWindow pass the height you want of the combo plus the opened listbox. The combo's edit will always have a default height, the rest is used to determine the height of the listbox.


It worked! Thanx!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!