graying out radio buttons during runtime?

Started by
1 comment, last by xhantos 19 years, 2 months ago
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 :)
Advertisement
EnableWindow( GetDlgItem( hwndDlg, resourceID ), FALSE ); // disable
EnableWindow( GetDlgItem( hwndDlg, resourceID ), TRUE ); // enable
---CyberbrineDreamsSuspected implementation of the Windows idle loop: void idle_loop() { *((char*)rand()) = 0; }
worked, thank you!

This topic is closed to new replies.

Advertisement