Jump to content
  • Advertisement

Archived

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

madcow

radio boxes with win32 api

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

How can you use the radio boxes(buttons) in normal win32 api in c++. Not with mfc. Because I know you can get and put the selection with CB_GETCURSEL with combo boxes but how can you do that with radio boxes.

Share this post


Link to post
Share on other sites
Advertisement
Check out some of the macros in WindowsX.h. They''ll make your life easier with check boxes, other controls, and even message handling.

Share this post


Link to post
Share on other sites
It has some combo box and list box functions but how can you get what radio button someone pressed and the next time when it start you can put that button on selected already.

Share this post


Link to post
Share on other sites
You have set a case for the radio buttons message via "BN_CLICKED" under the WM_COMMAND callback.

If you want to get the state of a button capriciously then send a message by doing the following:
"state=SendMessage(hRadio, BM_GETSTATE, 0, 0);"

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!