To disable or enable input to a control, use the EnableWindow function.
When you disable a control, it does not respond to user input. So that the user
can tell that the control is disabled, it appears dimmed. To disable a control, use
EnableWindow, specifying the value FALSE for the fEnable parameter, as follows:
EnableWindow
(hButton, FALSE);
To restore input to the disabled control, enable it by using the EnableWindow function with fEnable set to TRUE, as follows:
EnableWindow
(hButton, TRUE);