This example uses the WinSubstractRect call to subtract two rectangles.
#define INCL_WINRECTANGLES #include <OS2.H> HAB hab; RECTL resultrcl; /* result. */ RECTL rclminuend={25, /* x coordinate of left-hand edge of */ /* rectangle. */ 25, /* y coordinate of bottom edge of */ /* rectangle. */ 425,/* x coordinate of right-hand edge of */ /* rectangle. */ 425};/* y coordinate of top edge of rectangle. */ RECTL rclsubtrahend={15, /* x coordinate of left-hand edge of */ /* rectangle. */ 15, /* y coordinate of bottom edge of */ /* rectangle. */ 125,/* x coordinate of right-hand edge of */ /* rectangle. */ 125};/* y coordinate of top edge of rectangle.*/ WinSubtractRect(hab, &resultrcl, &rclminuend, &rclsubtrahend);