This example uses WinDrawBorder to draw the border (width of 5) and interior of a 300x200 rectangle anchored at (0,0), and using the area's current attributes for both the border and interior colors.

#define INCL_WINWINDOWMGR       /* Window Manager Functions     */
#include <os2.h>

HPS   hps;              /* presentation-space handle            */
BOOL    fSuccess;       /* success indicator                    */
RECTL   prclRectangle={0,0,300,200}; /* border rectangle        */
LONG    lVertSideWidth=5; /* Width of border rectangle vertical
                             sides                              */
LONG    lHorizSideWidth=5;/* Width of border rectangle horizontal
                             sides                              */
ULONG   flCmd;          /* draw flags                           */

/* use current area attributes */
flCmd = DB_AREAATTRS;

fSuccess = WinDrawBorder(hps, &prclRectangle, lVertSideWidth,
                         lHorizSideWidth, 0L, 0L, flCmd);


[Back] [Next]