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( );

Параметры

  • 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 deflate each side of CRect.

Заметки

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

The third overload deflates CRect by the number of units specifed in each member of the parameter. Note that this overload functions like DeflateRect.

Пример

CRect   rect1(100, 235, 200, 335);
CPoint   pt(35, 65);

rect1 -= pt;

CRect   rectResult(65, 170, 165, 270);
ASSERT(rect1 == rectResult);   

Требования

Header: atltypes.h

См. также

Основные понятия

CRect Class

CRect Members

Hierarchy Chart

CRect::OffsetRect

CRect::DeflateRect

CRect::SubtractRect

CRect::operator -

CRect::operator +=