Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CRgn::OffsetRgn

Moves the region stored in the CRgn object by the specified offsets.

int OffsetRgn(
   int x,
   int y 
);
int OffsetRgn(
   POINT point 
);

Parameters

x
Specifies the number of units to move left or right.
y
Specifies the number of units to move up or down.
point
The x-coordinate of point specifies the number of units to move left or right. The y-coordinate of point specifies the number of units to move up or down. The point parameter may be either a POINT structure or a CPoint object.

Return Value

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

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

Remarks

The function moves the region x units along the x-axis and y units along the y-axis.

The coordinate values of a region must be less than or equal to 32,767 and greater than or equal to –32,768. The x and y parameters must be carefully chosen to prevent invalid region coordinates.

Example

See the example for CRgn::CreateEllipticRgn.

See Also

CRgn Overview | Class Members | Hierarchy Chart | OffsetRgn

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.