qpgraph.hlp (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.
_SetBkColor Procedure
  Summary Details Example                                   Back
 
  Argument
 
    color    Specifies background color
 
  Description
 
    The _SetBkColor procedure sets the current background color to the
    color specified in the LongInt parameter color. The background color
    cannot be changed in _HResBW or _OResColor modes.
 
    In a text mode (such as _TextC80), _SetBkColor accepts and
    _GetBkColor returns a color index. For example, _SetBkColor( 2 )
    sets the background color to color index 2. The actual color
    displayed depends on the palette mapping for color index 2. The
    default color value for color index 2 is green in a color text
    mode.
 
    In a color graphics mode (such as _EResColor), _SetBkColor
    accepts and _GetBkColor returns a color value (as used in
    _RemapPalette). The value for the background color can be given
    by the color constants defined in MSGraph. For example,
    _SetBkColor( _Green ) sets the background color in a color graphics
    mode to green. These constants are provided for convenience in
    working with the most common colors. The actual range of colors
    available is generally much greater. Other constants are available
    for the monochrome graphics mode, _EResNoColor. In _EResNoColor mode,
    only 0 through 8 are valid background color values. See MSGraph for
    definitions of these constants.
 
    When a color argument is of type LongInt, it generally refers to a
    color value, and when it is of type Integer, it refers to an
    attribute or color index. _SetBkColor and _GetBkColor are
    exceptions: the argument is a color index in text modes and
    a color value in graphics modes. A more complete discussion of
    colors is given in the description of the _RemapPalette function.
 
    _RemapPalette can also be used to set the background color in
    graphics modes. The background color has a color index of 0.
    Unlike _RemapPalette, however, _SetBkColor does not require an
    EGA, MCGA, or VGA environment.
 
    In a text mode, _SetBkColor affects subsequent output, but does not
    change the current display. In a graphics mode, it immediately
    changes the appearance of all background pixels.
 
  _GrStatus Returns
 
    _GrInvalidParameter, _GrParameterAltered