win12.hlp (Table of Contents; Topic list)
WinQueryWindowRect (1.2)
Function Group                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINWINDOWMGR
 
BOOL WinQueryWindowRect(hwnd, prcl)
HWND hwnd;      /* handle of the window                       */
PRECTL prcl;    /* address of structure for window coordinates */
 
The WinQueryWindowRect function retrieves the coordinates of a window.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hwnd       Identifies the window whose coordinates are retrieved.
 
prcl       Points to a RECTL structure that receives the window's
           coordinates. The xLeft and yBottom fields will be zero. The
           xRight and yTop fields will contain the width and height of the
           window.
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs.
 
Example
 
This example calls WinQueryWindowRect to get the dimensions of the window,
and then calls WinFillRect to fill the window.
 
HPS hps;
RECTL rcl;
 
WinQueryWindowRect(hwnd, &rcl);       /* get window dimensions */
WinFillRect(hps, &rcl, CLR_WHITE);    /* clear entire window   */
 
See Also
 
WinQueryWindowPos, RECTL