This topic has not yet been rated - Rate this topic

GetTextColor function

Applies to: desktop apps only

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

Minimum supported server

Windows 2000 Server

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

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ