# Function Reference

# _WinAPI_IntersectRect

Creates the intersection of two rectangles

#include <WinAPIGdi.au3>
_WinAPI_IntersectRect ( $tRECT1, $tRECT2 )

## Parameters

$tRECT1 | $tagRECT structure that contains the first source rectangle.
$tRECT2 | $tagRECT structure that contains the second source rectangle.

## Return Value

Success: | $tagRECT structure that contains the intersection of the $tRECT1 and $tRECT2 rectangles.
Failure: | Sets the @error flag to non-zero.

## Remarks

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

## See Also

Search IntersectRect in MSDN Library.