CWindow.GetWindowRectmethod
Retrieves the unscaled dimensions of the bounding rectangle of the main window.
Syntax
SUB GetWindowRect (BYVAL hwnd AS HWND, BYVAL lpRect AS LPRECT)
FUNCTION GetWindowRect (BYVAL hwnd AS HWND) AS RECT
Parameters
| Name | Description | |
|---|---|---|
hwnd | Handle to the window or control. | |
lpRect | Pointer to a RECT structure that receives the client coordinates. The left and top members are zero. The right and bottom members contain the width and height of the window. |
Description
Retrieves the unscaled dimensions of the bounding rectangle of the main window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
Remarks
In conformance with conventions for the RECT structure, the bottom-right coordinates of the returned rectangle are exclusive. In other words, the pixel at (right, bottom) lies immediately outside the rectangle.
Examples
DIM rc AS RECT pWindow.GetWindowRect(@rc)
DIM rc AS RECT = pWindow.GetWindowRect
Reference
- Include file
CWindow.inc - Defined in AfxNova/CWindow.inc:1142
- Documented in Windows/Windows GUI/CWindow Class.md
- Topic: CWindow Class