Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Combo Box

This topic is 5459 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

Hello. I wanted to create an DialogBox to setup the graphic. I decided to use a Combo box to set the resolution. I created the DialogBox with Visual C++ and wrote some resolutions to the data of the Combo Box (in the DialogBox Editor). When I run the Program this resolutions aren''t shown (Maybe because my Program is a Win32 API and not a MFC API). I don''t know how to show the text. Thank you for help

Share this post

Link to post
Share on other sites
A common problem with Combo Box''s is that the size of the box has to encompass all the possible items in the box. Was this your problem? Might have been something else.

[ vangelis ]

Share this post

Link to post
Share on other sites
This wasn''t my problem. If I choose Layout->Test in the Dialog-Editor-Menu it works well. But in my Program it works not the same. If I click on the arrow (in my program) the list is shown, but it''s only white, there''s no text in it.

I have Screenshots:


Share this post

Link to post
Share on other sites
Ahhh, mein deutsche freund,

It sounds like you have the same problem I had.
For some reason, using win32, you cannot specify what you get loaded into the combo box at design time, it has to be a runtime thing.
Use the relevent SendDlgItemMessage funtion or its relevent macros:

/*The dialog is being initialized*/
/*Add all the options to the combo box*/
char Buffer[64];
strcpy(Buffer,"Question & Answer");
strcpy(Buffer,"Multiple Choice");

where IDC_ROUNDYPE is a combobox, Buffer is a string and the wParam bit (i.e. the number) is the index to add the string.

You then read the input like this:


which will return teh index selected

Hope that helps.

BTW I think the diolog box editor only works with MFC ( i donno, only used MFC twice... )


Does it matter? Even if it does matter, does it matter that it matters?

Share this post

Link to post
Share on other sites

  • 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!