CRect::OffsetRect

voidOffsetRect(intx**,inty);**

voidOffsetRect(POINTpoint**);**

voidOffsetRect(SIZEsize**);**

Parameters

x

Specifies the amount to move left or right. It must be negative to move left.

y

Specifies the amount to move up or down. It must be negative to move up.

point

Contains a POINT structure or CPoint object specifying both dimensions by which to move.

size

Contains a SIZE structure or CSize object specifying both dimensions by which to move.

Remarks

Moves CRect by the specified offsets. Moves CRectx units along the x-axis and y units along the y-axis. The x and y parameters are signed values, so CRect can be moved left or right and up or down.

Example

CRect rect(0, 0, 35, 35);

rect.OffsetRect(230, 230);

// rect is now (230, 230, 265, 265)
ASSERT(rect == CRect(230, 230, 265, 265));

CRect OverviewClass MembersHierarchy Chart

See Also   CRect::operator +, CRect::operator +=, CRect::operator -, CRect::operator -=