CRect::IntersectRect

BOOL IntersectRect( LPCRECT lpRect1, LPCRECT lpRect2 );

Return Value

Nonzero if the intersection is not empty; 0 if the intersection is empty.

Parameters

lpRect1

Points to a RECT structure or CRect object that contains a source rectangle.

lpRect2

Points to a RECT structure or CRect object that contains a source rectangle.

Remarks

Makes a CRect equal to the intersection of two existing rectangles. The intersection is the largest rectangle contained in both existing rectangles.

Note   Both of the rectangles must be normalized or this function may fail. You can call NormalizeRect to normalize the rectangles before calling this function.

CRect OverviewClass MembersHierarchy Chart

See Also   CRect::operator &=, CRect::operator &, CRect::UnionRect, CRect::SubtractRect, CRect::NormalizeRect, ::IntersectRect