I need help. How do I set a button in a dialog box as grayed? The buttons are created in a .rc file.
I know it's something like SendMessage(whatever).
I don't know what to put in the parynthesis. Thanks for the help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can use BOOL EnableWindow(HWND,BOOL) ,where HWND is the handle to your control, BOOL is TRUE to enable, FALSE to disable (ie grayed) and the return value (BOOL) is the previous state.
Or set the WS_DISABLED window style for the control in your resource script for the dialog and use EnableWindow as described above to re-enable it as required.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I need help. How do I set a button in a dialog box as grayed? The buttons are created in a .rc file.
I know it's something like SendMessage(whatever).
I don't know what to put in the parynthesis. Thanks for the help!
You can use BOOL EnableWindow(HWND,BOOL) ,where HWND is the handle to your control, BOOL is TRUE to enable, FALSE to disable (ie grayed) and the return value (BOOL) is the previous state.
Or set the WS_DISABLED window style for the control in your resource script for the dialog and use EnableWindow as described above to re-enable it as required.