This function queries the window size and position of a visible window.
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwnd; /* Window handle. */ PSWP pswp; /* SWP structure. */ BOOL rc; /* Success indicator. */ rc = WinQueryWindowPos(hwnd, pswp);