Jump to content
  • Advertisement

Archived

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

tdk_ratboy

ComboBox tutorial

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

Was wondering if anyone has a refernce to a good tutorial covering ComboBoxes, because MSDN isn''t helping and I wanted to know how to make my box pop out. Thanx in advance!

Share this post


Link to post
Share on other sites
Advertisement
resource.h:
quote:

#define IDC_COMBOBOXID 201


resource.rc:
quote:

#include <windows.h>
#include "resource.h"

IDD_DIALOG DIALOG 44,27,262,74
STYLE DS_CENTER|DS_SETFOREGROUND|WS_CAPTION|WS_SYSMENU
CAPTION "WINDOW_TITLE"
FONT 8, "Tahoma"
BEGIN
COMBOBOX IDC_COMBOBOXID,15,21,80,70,CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP
END


your cpp:
quote:

...
HWND combo_list = GetDlgItem(hwnd, IDC_COMBOBOXID);

SendMessage(combo_list,CB_ADDSTRING,0,(LPARAM)"One");
SendMessage(combo_list,CB_ADDSTRING,0,(LPARAM)"Two");
SendMessage(combo_list,CB_ADDSTRING,0,(LPARAM)"Three");
...



You play with that ;o)

/shrt

[edited by - shrt on October 21, 2003 5:14:38 PM]

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!