This function returns a window rectangle.
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ #include <os2.h> HWND hwnd; /* Window handle whose rectangle is retrieved. */ PRECTL prclDest; /* Window rectangle. */ BOOL rc; /* Rectangle-returned indicator. */ rc = WinQueryWindowRect(hwnd, prclDest);