Archived

This topic is now archived and is closed to further replies.

JoHnOnIzEr

Intersecting RECTs

Recommended Posts

How can i determine if two rects intersect? I know there is an API call for this but i cant remember what it is. EDIT: I forgot to mention im using VB [edited by - JoHnOnIzEr on August 5, 2003 12:42:56 AM]

Share this post


Link to post
Share on other sites
MSDN is your friend!
quote:

BOOL IntersectRect(
LPRECT lprcDst, // intersection buffer
CONST RECT *lprcSrc1, // first rectangle
CONST RECT *lprcSrc2 // second rectangle
);

Parameters

lprcDst
[out] Pointer to the RECT structure that is to receive the intersection of the rectangles pointed to by the lprcSrc1 and lprcSrc2 parameters. This parameter cannot be NULL.
lprcSrc1
[in] Pointer to the RECT structure that contains the first source rectangle.
lprcSrc2
[in] Pointer to the RECT structure that contains the second source rectangle.


You''ll have to convert that into VB syntax, of course.

Share this post


Link to post
Share on other sites