Partilhar via


CRect::operator +=

The first two overloads move CRect by the specified offsets.

void operator +=( 
   POINT point  
) throw( );
void operator +=( 
   SIZE size  
) throw( );
void operator +=( 
   LPCRECT lpRect  
) throw( );

Parameters

  • point
    A POINT structure or CPoint object that specifies the number of units to move the rectangle.

  • size
    A SIZE structure or CSize object that specifies the number of units to move the rectangle.

  • lpRect
    Points to a RECT structure or CRect object that contains the number of units to inflate each side of CRect.

Remarks

The parameter's x and y (or cx and cy) values are added to CRect.

The third overload inflates CRect by the number of units specifed in each member of the parameter.

Example

CRect   rect1(100, 235, 200, 335);
CPoint   pt(35, 65);
CRect   rect2(135, 300, 235, 400);

rect1 += pt;

ASSERT(rect1 == rect2);   

Requirements

Header: atltypes.h

See Also

Reference

CRect Class

Hierarchy Chart

CRect::OffsetRect

CRect::InflateRect

CRect::operator +

CRect::operator -=

Other Resources

CRect Members