Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The GetWindowRgnBox function retrieves the dimensions of the tightest bounding rectangle for the window region of a window.
Syntax
int GetWindowRgnBox(
[in] HWND hWnd,
[out] LPRECT lprc
);
Parameters
[in] hWnd
Handle to the window.
[out] lprc
Pointer to a RECT structure that receives the rectangle dimensions, in device units relative to the upper-left corner of the window.
Return value
The return value specifies the type of the region that the function obtains. It can be one of the following values.
Value | Meaning |
---|---|
COMPLEXREGION | The region is more than one rectangle. |
ERROR | The specified window does not have a region, or an error occurred while attempting to return the region. |
NULLREGION | The region is empty. |
SIMPLEREGION | The region is a single rectangle. |
Remarks
The window region determines the area within the window where the system permits drawing. The system does not display any portion of a window that lies outside of the window region. The coordinates of a window's window region are relative to the upper-left corner of the window, not the client area of the window.
To set the window region of a window, call the SetWindowRgn function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
API set | ext-ms-win-ntuser-draw-l1-1-0 (introduced in Windows 8) |