| BOOL SetTextColor( |
| |
COLORREF rgbColor, |
|
| |
BOOL bForeground |
|
| ); |
The SetTextColor method changes the current foreground or
background text color.
Parameters
- rgbColor
- A color value which specifies the current foreground or
background text color. The RGB macro can be used to specify the
red, green and blue values for the color.
- bForeground
- A boolean value which determines if the foreground or
background color is changed. A value of TRUE indicates that the
foreground color should be changed, otherwise the background color
is changed.
Return Value
If the method succeeds, the return value is non-zero. If the
method fails, the return value is zero. Failure indicates that the
handle to the display is invalid or that the current display does not
support color text attributes.
Remarks
This method is used to change the current foreground or background
color, as determined by the text attribute. Note that changing the
current foreground or background text color does not affect the
virtual display color table. To change how color attributes are
mapped to an RGB color value, use the SetColorMap method.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csnvtv12.lib
See Also
|