[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
SetTextColor( hDC, nRGBColor ) -> <nRGBColorOld>
------------------------------------------------------------------------------
PARAMETER:
<hDC> Is the handle to the Device Context
<nRGBColor> the target color in RGB format. If the system can not use
that color, windows will automatically use the nearest
available color.
RETURNS:
<nRGBColorOld> is the previous text color in RGB format.
DESCRIPTION:
The SetTextColor() function sets the current text color to the specified
color and returns the previous text color of the device context
EXAMPLE:
+-------------------------------------------------------------+
| /* output a white string on a blue background */ |
| hDC := getDC( oWnd:hWnd ) |
| SetBkColor( hDC, CLR_BLUE ) |
| SetTextColor( hDC, CLR_WHITE ) |
| TextOut( hDC, 10, 10 , "This is a white string" ) |
| ReleaseDC( hDC ) |
+-------------------------------------------------------------+
SOURCE:
SOURCE\WINAPI\COLOR.C
See Also:
GetTextColor
SetBkMode
SetBkColor
TextOut
hDC
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson