+ LONG Style = NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE);
+ Style = bEnable ? Style & ~WS_DISABLED : Style | WS_DISABLED;
+ NtUserSetWindowLong(hWnd, GWL_STYLE, Style, FALSE);
+
+ SendMessageA(hWnd, WM_ENABLE, (LPARAM) IsWindowEnabled(hWnd), 0);
+
+ // Return nonzero if it was disabled, or zero if it wasn't:
+ return IsWindowEnabled(hWnd);