OffsetRgn

  int OffsetRgn(hrgn, nXOffset, nYOffset)    
  HRGN hrgn; /* handle of region */
  int nXOffset; /* offset along x-axis */
  int nYOffset; /* offset along y-axis */

The OffsetRgn function moves a region by the specified x- and y-offsets.

Parameters

hrgn

Identifies the region to be moved.

nXOffset

Specifies the number of logical units to move left or right.

nYOffset

Specifies the number of logical units to move up or down.

Return Value

The return value specifies the new region's complexity. It can be any one of the following values:

Value Meaning

COMPLEXREGION Region has overlapping borders.
ERROR An error occurred. Region is unaffected.
NULLREGION Region is empty.
SIMPLEREGION Region has no overlapping borders.