The GetTextColor function retrieves the current text color for the specified device context.
COLORREF GetTextColor(
HDC hdc // handle to device context
);
If the function succeeds, the return value is the current text color as a COLORREF value.
If the function fails, the return value is CLR_INVALID.
The text color defines the foreground color of characters drawn by using the TextOut or ExtTextOut function.
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, ExtTextOut, SetTextColor, TextOut