OffsetRgn

Syntax

int OffsetRgn(hRgn,X,Y)

This function moves the given region by the specified offsets. The function moves the region X units along the x-axis and Y units along the y-axis.

Parameter Type/Description  

hRgn HRGN Identifies the region to be moved.  
X int Specifies the number of units to move left or right.  
Y int Specifies the number of units to move up or down.  

Return Value

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

Value Meaning  

COMPLEXREGION Region has overlapping borders.  
ERROR Region handle is not valid.  
NULLREGION Region is empty.  
SIMPLEREGION Region has no overlapping borders.  

Comments

The coordinate values of a region must not be greater than 32,767 or less than –32,768. The X and Y parameters must be carefully chosen to prevent invalid regions.