SetTextColor (Compact 2013)

3/28/2014

This function sets the text color of the specified device context to the specified color.

Syntax

COLORREF SetTextColor(
  HDC hdc, 
  COLORREF crColor
); 

Parameters

  • hdc
    [in] Handle to the device context.
  • crColor
    [in] Value of type COLORREF that specifies the color of the text.

Return Value

A color reference for the previous text color indicates success. CLR_INVALID indicates failure. To get extended error information, call GetLastError.

Remarks

The ExtTextOut function uses the text color to draw the face of each character that ExtTextOut writes. The text color is also used when converting bitmaps from color to monochrome and vice versa.

Requirements

Header

windows.h

Library

coredll.lib

See Also

Reference

Fonts Functions
BitBlt
ExtTextOut
SetBkColor
StretchBlt
RGB