graying out radio buttons during runtime?
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 :)
EnableWindow( GetDlgItem( hwndDlg, resourceID ), FALSE ); // disable
EnableWindow( GetDlgItem( hwndDlg, resourceID ), TRUE ); // enable
EnableWindow( GetDlgItem( hwndDlg, resourceID ), TRUE ); // enable
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement