Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IntersectRect

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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

lprcDst

Long pointer to the RECT structure that is to receive the intersection of the rectangles pointed to by the lprcSrc1 and lprcSrc2 parameters.

lprcSrc1

Long pointer to the RECT structure that contains the first source rectangle.

lprcSrc2

Long pointer to the RECT structure that contains the second source rectangle.

Nonzero indicates that the rectangles intersect.

Zero indicates that the rectangles do not intersect.

To get extended error information, call GetLastError.

Headerwinuser.h
LibraryRectapi.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2015 Microsoft