This function sets the window enabled state.
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwnd; /* Window handle. */ BOOL fNewEnabled; /* New enabled state. */ BOOL rc; /* Window enabled indicator. */ rc = WinEnableWindow(hwnd, fNewEnabled);