This function calculates a rectangle that bounds the two source rectangles.
#define INCL_WINRECTANGLES /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ PRECTL prclDest; /* Bounding rectangle. */ PRECTL prclSrc1; /* First source rectangle. */ PRECTL prclSrc2; /* Second source rectangle. */ BOOL rc; /* Nonempty indicator. */ rc = WinUnionRect(hab, prclDest, prclSrc1, prclSrc2);