Archived

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

Combo Boxes and VC++

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

Recommended Posts

Alright, I hate to ask a question such as this, but I suppose there''s no option. I''ve tried creating a dialog box in VC++''s editor, and inluding a combo box in it. Let''s for the moment assume all its attributes are the defaults. No matter what data I have in the combo box, clicking on it NEVER shows anything, as if the combo box were empty. What am I missing here? And most importantly of all, has no one documented this sort of thing? If Microsoft has, it goes through great lengths to hide it. Can someone tell me what I''m doing wrong, and perhaps point me to a site with good tutorials on similar matters? -Arek the Absolute

Share on other sites
  #include

if you are using visual c++ right click on and select open file. Look around in there and you should be able to find API for adding and removing objects from the combo box

Sniper BoB

Share on other sites
Could you (or anyone else for that matter) be a bit more specific...? I''m not entirely sure what I''m looking for, apparently. I can''t even figure out how to get it to show the listbox items I give the combo box.

-Arek the Absolute

Share on other sites
In the Dialog box editor, click on the down button on the combo box and you will be able to set the height of the box.

For more on Windows Controls go to Winprog.

Share on other sites
Thanks, but things still aren''t working. No matter how far down the list goes, it is still blank. Why doesn''t it show the listbox data I enter...?

Share on other sites
If you are talking about why the data you entered in the combo box while editing the dialog box isn''t showing up when you actually run the program, I think it''s an MFC-specific feature, so you need to be using MFC dialogs (CDialog) to get that to work. Otherwise you need to add the strings manually when the dialog box is created.

Now if you are entering data in the dialog box while running the program, and pressing enter doesn''t add the data to the list, it''s because you have to do that manually also.

Share on other sites
Thanks, all. I was just disillusioned by the fact you can enter text in the combo box properties, but that it is useless to do so. Oy!
Thanks a bunch, particularly to mutex, but everyone else as well!

-A relieved Arek the Absolute

1. 1
2. 2
3. 3
Rutin
22
4. 4
JoeJ
16
5. 5

• 14
• 29
• 13
• 11
• 11
• Forum Statistics

• Total Topics
631774
• Total Posts
3002290
×