This function returns the state (enabled/disabled) of a window.
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwnd; /* Window handle. */ BOOL rc; /* Enabled-state indicator. */ rc = WinIsWindowEnabled(hwnd);