Jump to content
  • Advertisement

Archived

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

xstreme2000

Window Controls

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

I would like to know how to put control on to windows like radio buttons, check boxes. The only ones I can get to work are BUTTON and COMBOBOX can someone list the other class which can be used...I tried RADIO, CHECKBOX, CONTROL, SPIN but they didn''t work. eg CreateWindow("BUTTON", "Button1", ... );

Share this post


Link to post
Share on other sites
Advertisement
You got visual studio? Then it should be in the MSDN. But then, why won''t you use the GUI editor? It''s no shame, imho and works pretty good.

Jaap Suter

Share this post


Link to post
Share on other sites
I do use the Editor but now I need to use a combo box and the CB_ADDSTRING message. To do this I need hComboWnd to post the messages to if you have an easier way to do this Pleese tell me can you do something like this:
SendMessage((HWND)IDC_COMBOBOX1, CB_ADDSTRING, 0, &string);
???????????????????????????????????????????????????????????

//--- Created by Tom Oram ---
// tom.oram@vodafone.net

Share this post


Link to post
Share on other sites
I have just found out how to do it so if anyone is interested then here it is.

HWND hCombo = GetDlgItem(hDlg, IDC_COMBOBOX1);
SendMessage(hCombo, CB_ADD ... );

Share this post


Link to post
Share on other sites
xstreme2000, u kind of solve part of my problem too, thanx!

Maybe they should change the name, GetDlgItem() to GetCtrlHandle()? Doesn''t it mean better?

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!