IntersectRect (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function calculates the intersection of two source rectangles and places the coordinates of the intersection rectangle into the destination rectangle.

If the source rectangles do not intersect, an empty rectangle (in which all coordinates are set to zero) is placed into the destination rectangle.

BOOL IntersectRect(
  LPRECT lprcDst, 
  const RECT* lprcSrc1, 
  const RECT* lprcSrc2


Long pointer to the RECT structure that is to receive the intersection of the rectangles pointed to by the lprcSrc1 and lprcSrc2 parameters.
Long pointer to the RECT structure that contains the first source rectangle.
Long pointer to the RECT structure that contains the second source rectangle.

Return Values

Nonzero indicates that the rectangles intersect.

Zero indicates that the rectangles do not intersect.

To get extended error information, call GetLastError.


OS Versions: Windows CE 1.0 and later.
Header: Winuser.h.
Link Library: Rectapi.lib.

See Also

InflateRect | OffsetRect | UnionRect | RECT

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.