win12.hlp (Table of Contents; Topic list)
WinIntersectRect (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINRECTANGLES
 
BOOL WinIntersectRect(hab, prclDst, prclSrc1, prclSrc2)
HAB hab;           /* handle of the anchor block                          */
PRECTL prclDst;    /* address of structure for intersection of rectangles */
PRECTL prclSrc1;   /* address of structure with first rectangle           */
PRECTL prclSrc2;   /* address of structure with second rectangle          */
 
The WinIntersectRect function calculates the intersection of two source
rectangles and places the coordinates of the intersection rectangle into the
destination rectangle. If the rectangles do not intersect, an empty
rectangle (0, 0, 0, 0) is placed into the destination rectangle.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hab        Identifies the anchor block.
 
prclDst    Points to the RECTL structure that receives the intersection of
           the rectangles designated by the prclSrc1 and prclSrc2
           parameters.
 
prclSrc1   Points to the RECTL structure that contains the first source
           rectangle.
 
prclSrc2   Points to the RECTL structure that contains the second source
           rectangle.
 
Return Value
 
The return value is TRUE if the source rectangles intersect, or FALSE if
they do not.
 
See Also
 
WinUnionRect, RECTL