Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GetTextColor function

The GetTextColor function retrieves the current text color for the specified device context.

Syntax


COLORREF GetTextColor(
  _In_ HDC hdc
);

Parameters

hdc [in]

Handle to the device context.

Return value

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. No extended error information is available.

Remarks

The text color defines the foreground color of characters drawn by using the TextOut or ExtTextOut function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Fonts and Text Overview
Font and Text Functions
ExtTextOut
SetTextColor
TextOut
COLORREF

 

 

Show: