GetRegionData function (wingdi.h)
The GetRegionData function fills the specified buffer with data describing a region. This data includes the dimensions of the rectangles that make up the region.
Syntax
DWORD GetRegionData(
[in] HRGN hrgn,
[in] DWORD nCount,
[out] LPRGNDATA lpRgnData
);
Parameters
[in] hrgn
A handle to the region.
[in] nCount
The size, in bytes, of the lpRgnData buffer.
[out] lpRgnData
A pointer to a RGNDATA structure that receives the information. The dimensions of the region are in logical units. If this parameter is NULL, then the return value contains the number of bytes needed for the region data.
Return value
If the function succeeds and nCount specifies an adequate number of bytes, then the return value equals the actual number of bytes used (less than or equal to nCount).
If lpRgnData is NULL, then the return value is the required number of bytes.
If the function fails, then the return value is zero.
If the failure is due to hrgn being invalid, then GetLastError returns ERROR_INVALID_HANDLE. Otherwise, GetLastError returns ERROR_INVALID_PARAMETER .
If nCount is too small, then the function fails.
Remarks
The GetRegionData function is used in conjunction with the ExtCreateRegion 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 | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |