Share via


Gdi::SetTextColor_I

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

static WINGDIAPI COLORREF WINAPI SetTextColor_I(
  HDC hdc,
  COLORREF crColor
);

Parameters

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

Return Values

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

Remarks

This method is an internal version of the SetTextColor function.

The text color is used to draw the face of each character written by the Gdi::ExtTextOutW_I method. The text color is also used in converting bitmaps from color to monochrome and vice versa.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Gdi.hpp.

See Also

SetTextColor | Gdi::BitBlt_I | Gdi::ExtTextOutW_I | Gdi::SetBkColor_I | Gdi::StretchBlt_I | RGB

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.