The SetTextColor function sets the text color for the specified device context to the specified color.
COLORREF SetTextColor(
HDC hdc, // handle to device context
COLORREF crColor // text color
);
If the function succeeds, the return value is a color reference for the previous text color.
If the function fails, the return value is CLR_INVALID.
Windows NT: To get extended error information, call GetLastError.
The text color is used to draw the face of each character written by the TextOut and ExtTextOut functions. The text color is also used in converting bitmaps from color to monochrome and vice versa.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in wingdi.h.
Import Library: Use gdi32.lib.
Fonts and Text Overview, Font and Text Functions, BitBlt, ExtTextOut, GetTextColor, RGB, SetBkColor, StretchBlt, TextOut