Archived

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

Arek the Absolute

Combo Boxes and VC++

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 this post


Link to post
Share on other sites
SnprBoB86    277
  
#include <commctrl.h>


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 this post


Link to post
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 this post


Link to post
Share on other sites
mutex    1111
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 this post


Link to post
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

Share this post


Link to post
Share on other sites