This function changes the focus window.
#define INCL_WININPUT /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ #include <os2.h> HWND hwndDeskTop; /* Desktop-window handle. */ HWND hwndNewFocus; /* Window handle to receive the focus. */ ULONG flFocusChange; /* Focus changing indicators. */ BOOL rc; /* Success indicator. */ rc = WinFocusChange(hwndDeskTop, hwndNewFocus, flFocusChange);