This function calculates the intersection of the two source rectangles and returns the result in the destination rectangle.

#define INCL_WINRECTANGLES /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HAB       hab;       /*  Anchor-block handle. */
PRECTL    pcrlDst;   /*  Intersection rectangle. */
PRECTL    pcrlSrc1;  /*  First rectangle. */
PRECTL    pcrlSrc2;  /*  Second rectangle. */
BOOL      rc;        /*  Success indicator. */

rc = WinIntersectRect(hab, pcrlDst, pcrlSrc1,
       pcrlSrc2);


[Back] [Next]