Jump to content
  • Advertisement
Sign in to follow this  
xhantos

graying out radio buttons during runtime?

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

Assuming i have a Dialog Window "hwndDlg" that has a radiobutton with the ID "resourceID" then the following code marks it as checked: SendDlgItemMessage(hwndDlg, resourceID, BM_SETCHECK,BST_CHECKED,0); That works. Yay! :) But how do I disable the button (e.g. graying it out) - is there a general ItemMessage you can send to any object in a dialog window that sets the "Disabled" parameter? Browsing winuser.h gave me a huge list of messages, but I can impossibly try all the possible combinations :)

Share this post


Link to post
Share on other sites
Advertisement
EnableWindow( GetDlgItem( hwndDlg, resourceID ), FALSE ); // disable
EnableWindow( GetDlgItem( hwndDlg, resourceID ), TRUE ); // enable

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!