CWindow.GetControlWindowRectmethod
Retrieves the unscaled dimensions of the bounding rectangle of the specified window.
Syntax
SUB GetControlWindowRect (BYVAL hwnd AS HWND, BYVAL lpRect AS LPRECT)
FUNCTION GetControlWindowRect (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 specified 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.GetControlWindowRect(hCtl, @rc)
DIM rc AS RECT = pWindow.GetControlWindowRect(hCtl)
Reference
- Include file
CWindow.inc - Defined in AfxNova/CWindow.inc:1194
- Documented in Windows/Windows GUI/CWindow Class.md
- Topic: CWindow Class