Jump to content
  • Advertisement
Sign in to follow this  
derek7

IsDlgButtonChecked and postmessage

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

if I use a IsDlgButtonChecked all is ok. but I use postmessage(hdlg,bm_getcheck,0,0) the return always is bst_checked, if you use sendmessage(hdlg,bm_getcheck,0,0) the return always is bst_unchecked. and on both situation the button does not reponse the mouse click. the focus is not change right .

Share this post


Link to post
Share on other sites
Advertisement

PostMessage()
'Return Values
If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError'

Use SendMessage

Share this post


Link to post
Share on other sites
And once you're calling SendMessage, make sure "hdlg" is a handle to a radio button or checkbox. You can get one via GetDlgItem(hdlg, ctrl_id).

In most cases you should be handling notifications from the button rather than trying to poll its state. (See WM_COMMAND and BN_CLICKED). Best to just idle unless something's changed.

Mike

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!