I was wondering if there was a function in user32 that could enable a hwnd control if it is disabled (grayed out) If I know the handle then can I do this? Also, if it is a menuitem, can it be done too?
Thanks
I was wondering if there was a function in user32 that could enable a hwnd control if it is disabled (grayed out) If I know the handle then can I do this? Also, if it is a menuitem, can it be done too?
Thanks
You could P/Invoke the EnableWindow function in the Windows API.
Not all controls, especially ones that are custom drawn and handled, will honor this completely, but it should provide good functionality for preventing user input into the control, even if it doesn't "gray out". All standard controls should work fine.