Overview
Group
Quick Info

Windows NT
Yes
Win95
Yes
Win32s
Yes
Import Library
gdi32.lib
Header File
wingdi.h
Unicode
No
Platform Notes
Windows 95: int == 16 bits

SetTextColor

The SetTextColor function sets the text color for the specified device context to the specified color.

COLORREF SetTextColor(

HDC hdc,
// handle of device context
COLORREF crColor
// text color
);

Parameters

hdc

Identifies the device context.

crColor

Specifies the color of the text.

Return Values

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. To get extended error information, call GetLastError.

Remarks

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.

See Also

BitBlt
, ExtTextOut, GetTextColor, RGB, SetBkColor, StretchBlt, TextOut

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database