This example converts a client window's boundaries into screen coordinates and calls WinCalcFrameRect to calculate an equivalent frame rectangle size.
#define INCL_WINFRAMEMGR /* Window Frame Functions */ #define INCL_WINWINDOWMGR /* Window Manager Functions */ #include <os2.h> BOOL fSuccess; /* Success indicator */ HWND hwndClient; /* client window */ HWND hwndFrame; /* frame window */ RECTL rclBoundary; /* Boundary rectangle */ /* convert client boundary coordinates to screen coordinates */ WinMapWindowPoints(hwndClient, HWND_DESKTOP, (PPOINTL)&rclBoundary, 2); /* calculate equivalent frame boundary from boundary data */ fSuccess = WinCalcFrameRect(hwndFrame, &rclBoundary, FALSE);