Creates the intersection of two rectangles

#include <WinAPIGdi.au3>

_WinAPI_IntersectRect ( $tRECT1, $tRECT2 )

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

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

Success: | $tagRECT structure that contains the intersection of the $tRECT1 and $tRECT2 rectangles. |

Failure: | Sets the @error flag to non-zero. |

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

placed into the destination rectangle.

Search IntersectRect in MSDN Library.