CombineRgn function
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 hrgnDest, _In_ HRGN hrgnSrc1, _In_ HRGN hrgnSrc2, _In_ int fnCombineMode );
Parameters
- hrgnDest [in]
-
A handle to a new region with dimensions defined by combining two other regions. (This region must exist before CombineRgn is called.)
- hrgnSrc1 [in]
-
A handle to the first of two regions to be combined.
- hrgnSrc2 [in]
-
A handle to the second of two regions to be combined.
- fnCombineMode [in]
-
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
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- Regions Overview
- Region Functions
- CreateEllipticRgn
- CreateEllipticRgnIndirect
- CreatePolygonRgn
- CreatePolyPolygonRgn
- CreateRectRgn
- CreateRectRgnIndirect
- CreateRoundRectRgn