win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinFillRect (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINWINDOWMGR
 
BOOL WinFillRect(hps, pcrl, clr)
HPS hps;        /* handle of the presentation space            */
PRECTL pcrl;    /* address of the structure with the rectangle */
COLOR clr;      /* color of the rectangle                      */
 
The WinFillRect function fills a rectangular area. It does not change any
presentation-space state.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space where the rectangle is drawn.
 
pcrl       Points to the RECTL structure that contains the coordinates of
           the rectangle to fill.
 
clr        Specifies the rectangle color. This parameter is either a color
           index or an RGB color value, depending on how a logical color
           table has been loaded. (For more information on color tables, see
           GpiCreateLogColorTable.)
 
           Typically, this parameter will be a color index taken from one of
           the following values:
 
               CLR_WHITE                  CLR_DARKGRAY
               CLR_BLACK                  CLR_DARKBLUE
               CLR_BACKGROUND             CLR_DARKRED
               CLR_BLUE                   CLR_DARKPINK
               CLR_RED                    CLR_DARKGREEN
               CLR_PINK                   CLR_DARKCYAN
               CLR_GREEN                  CLR_BROWN
               CLR_CYAN                   CLR_PALEGRAY
               CLR_YELLOW                 CLR_NEUTRAL
 
               SYSCLR_WINDOWSTATICTEXT    SYSCLR_WINDOWTEXT
               SYSCLR_SCROLLBAR           SYSCLR_TITLETEXT
               SYSCLR_BACKGROUND          SYSCLR_ACTIVEBORDER
               SYSCLR_ACTIVETITLE         SYSCLR_INACTIVEBORDER
               SYSCLR_INACTIVETITLE       SYSCLR_APPWORKSPACE
               SYSCLR_MENU                SYSCLR_HELPBACKGROUND
               SYSCLR_WINDOW              SYSCLR_HELPTEXT
               SYSCLR_WINDOWFRAME         SYSCLR_HELPHILITE
               SYSCLR_MENUTEXT            SYSCLR_CSYSCOLORS
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs.
 
Example
 
This example calls WinBeginPaint to get a presentation-space handle and the
coordinates of the update rectangle. It then calls WinFillRect to fill the
update rectangle.
 
case WM_PAINT:
    hps = WinBeginPaint(hwnd, (HPS) NULL, &rcl);
    WinFillRect(hps,    /* presentation-space handle    */
        &rcl,           /* coordinates of the rectangle */
        CLR_WHITE);     /* color to use                 */
    WinEndPaint(hps);
 
See Also
 
GpiCreateLogColorTable, RECTL