CombineRgn function (wingdi.h)
The CombineRgn function combines two regions and stores the result in a third region. The two regions are combined according to the specified mode.
Syntax
int CombineRgn(
[in] HRGN hrgnDst,
[in] HRGN hrgnSrc1,
[in] HRGN hrgnSrc2,
[in] int iMode
);
Parameters
[in] hrgnDst
A handle to a new region with dimensions defined by combining two other regions. (This region must exist before CombineRgn is called.)
[in] hrgnSrc1
A handle to the first of two regions to be combined.
[in] hrgnSrc2
A handle to the second of two regions to be combined.
[in] iMode
A mode indicating how the two regions will be combined. This parameter can be one of the following values.
Return value
The return value specifies the type of the resulting region. It can be one of the following values.
Return code | Description |
---|---|
|
The region is empty. |
|
The region is a single rectangle. |
|
The region is more than a single rectangle. |
|
No region is created. |
Remarks
The three regions need not be distinct. For example, the hrgnSrc1 parameter can equal the hrgnDest parameter.
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 |