NvtSetDisplayColor Function  
 
BOOL WINAPI NvtSetDisplayColor(
  HDISPLAY hDisplay,  
  UINT nColorIndex,  
  COLORREF dwColor,  
  BOOL bForeground  
);

The NvtSetDisplayColor function sets the colors used by the virtual display. Each display has a color table which specifies the foreground and background colors used when displaying text with a specific attribute.

Parameters

hDisplay
Handle to the virtual display.
nColorIndex
The index into the virtual display color table. It may be one of the following values.
Constant Description
NVT_COLOR_NORMAL The colors displayed for normal text. These are the default colors used with the display.
NVT_COLOR_REVERSE The colors displayed for text with the reverse attribute set. This is only used when emulation is enabled.
NVT_COLOR_BOLD The colors displayed for text with the bold attribute set. This is only used when emulation is enabled.
NVT_COLOR_REVERSEBOLD The colors displayed for text with the reverse and bold attributes set. This is only used when emulation is enabled.
dwColor
The RGB color value that will be used.
bForeground
A boolean flag which specifies if the color is a foreground color, used when displaying text, or a background color.

Return Value

If the function succeeds, the return value is non-zero. If the function fails, it returns zero.

Remarks

The default colors for the display is a black background and white foreground. Bold characters are displayed on a white background and blue foreground.

Requirements

Client: Requires Windows 7, Windows Vista or Windows XP.
Server: Requires Windows Server 2008 or Windows Server 2003.
Header: Include cstools7.h.
Library: Use csnvtav7.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

NvtGetDisplayColor, NvtSetDisplayBackColor, NvtSetDisplayBoldColor, NvtSetDisplayForeColor