• Advertisement

Archived

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

radio boxes with win32 api

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