This function determines whether the active window belongs to the calling execution thread.
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle of calling thread. */ BOOL rc; /* Active-window indicator. */ rc = WinIsThreadActive(hab);