---
name: "CombineRgn"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/CombineRgn"
---

# CombineRgn(3w)

## NAME

**CombineRgn** (GDI32.@)

## SYNOPSIS

INT CombineRgn\
  (\
   HRGN *hDest*,\
   HRGN *hSrc1*,\
   HRGN *hSrc2*,\
   INT  *mode*\
  )

## DESCRIPTION

Combines two regions with the specified operation and stores the result in the specified destination region.

## PARAMS

*hDest* **\[In\]**  The region that receives the combined result.

*hSrc1* **\[In\]**  The first source region.

*hSrc2* **\[In\]**  The second source region.

*mode* **\[In\]**  The way in which the source regions will be combined. See notes.

## RETURNS

**Success:** **NULLREGION** **-** The new region is empty. **SIMPLEREGION** **-** The new region can be represented by one rectangle. **COMPLEXREGION** **-** The new region can only be represented by more than one rectangle.

**Failure:** **ERROR**.

## NOTES

The two source regions can be the same region. The *mode* can be one of the following: \
\
   RGN\_AND - Intersection of the regions\
\
   RGN\_OR - Union of the regions\
\
   RGN\_XOR - Unions of the regions minus any intersection.\
\
   RGN\_DIFF - Difference (subtraction) of the regions.

## IMPLEMENTATION

Declared in **"windowsx.h"**.

Implemented in **"dlls/gdi32/region.c"**.

Debug channel **"region"**.
