GETBKCOLOR

Graphics Function: Gets the current background color index for both text and graphics output.

Module: USE DFLIB

Syntax

result = GETBKCOLOR( )

Results:

The result is of type INTEGER(4). The result is the current background color index.

GETBKCOLOR returns the current background color index for both text and graphics, as set with SETBKCOLOR. The color index of text over the background color is set with SETTEXTCOLOR and returned with GETTEXTCOLOR. The color index of graphics over the background color is set with SETCOLOR and returned with GETCOLOR. These non-RGB color functions use color indexes, not true color values, and limit the user to colors in the palette, at most 256. For access to all system colors, use SETBKCOLORRGB, SETCOLORRGB, and SETTEXTCOLORRGB.

Generally, INTEGER(4) color arguments refer to color values and INTEGER(2) color arguments refer to color indexes. The two exceptions are GETBKCOLOR and SETBKCOLOR. The default background index is 0, which is associated with black unless the user remaps the palette with REMAPPALETTERGB.


Note: The GETBKCOLOR routine described here is a QuickWin routine. If you are trying to use the Win32 SDK version of the GetBkColor routine by including the DFWIN module, you need to specify the routine name as MSFWIN$GetBkColor. For more information, see Special Naming Convention for Certain QuickWin and Win32 Graphics Routines in the Programmer's Guide.

Compatibility

STANDARD GRAPHICS QUICKWIN GRAPHICS LIB

See Also: GETBKCOLORRGB, SETBKCOLOR, GETCOLOR, GETTEXTCOLOR, REMAPALLPALETTERGB, REMAPPALETTERGB

Example

USE DFLIB
INTEGER(4) bcindex
bcindex = GETBKCOLOR()