Skip to content

Latest commit

 

History

History
184 lines (139 loc) · 3.97 KB

nf-tom-itextfont-setforecolor.md

File metadata and controls

184 lines (139 loc) · 3.97 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:tom.ITextFont.SetForeColor
ITextFont::SetForeColor (tom.h)
Sets the foreground (text) color.
ITextFont interface [Windows Controls]
SetForeColor method
ITextFont.SetForeColor
ITextFont::SetForeColor
SetForeColor
SetForeColor method [Windows Controls]
SetForeColor method [Windows Controls]
ITextFont interface
_win32_ITextFont_SetForeColor
_win32_ITextFont_SetForeColor_cpp
controls.ITextFont_SetForeColor
controls._win32_ITextFont_SetForeColor
tom/ITextFont::SetForeColor
controls\ITextFont_SetForeColor.htm
Controls
VS|Controls|~\controls\richedit\textobjectmodel\textobjectmodelreference\textobjectmodelinterfaces\setforecolor.htm
12/05/2018
ITextFont interface [Windows Controls],SetForeColor method, ITextFont.SetForeColor, ITextFont::SetForeColor, SetForeColor, SetForeColor method [Windows Controls], SetForeColor method [Windows Controls],ITextFont interface, _win32_ITextFont_SetForeColor, _win32_ITextFont_SetForeColor_cpp, controls.ITextFont_SetForeColor, controls._win32_ITextFont_SetForeColor, tom/ITextFont::SetForeColor
tom.h
Windows
Windows Vista [desktop apps only]
Windows Server 2003 [desktop apps only]
Msftedit.dll
Windows
19H1
ITextFont::SetForeColor
tom/ITextFont::SetForeColor
c++
APIRef
kbSyntax
COM
Msftedit.dll
ITextFont.SetForeColor

ITextFont::SetForeColor

-description

Sets the foreground (text) color.

-parameters

-param Value [in]

Type: long

The new foreground color. It can be one of the following.

Value Meaning
A COLORREF value. An RGB color.
A value returned by PALETTEINDEX A palette index.
tomUndefined No change.
tomAutoColor Use the default foreground color.
 

If Value contains an RGB color, generate the COLORREF by using the RGB macro.

-returns

Type: HRESULT

If the method succeeds, it returns S_OK. If the method fails, it returns one of the following COM error codes. For more information about COM error codes, see Error Handling in COM.

Return code Description
E_INVALIDARG
Invalid argument.
CO_E_RELEASED
The font object is attached to a range that has been deleted.
E_ACCESSDENIED
Write access is denied.
E_OUTOFMEMORY
Insufficient memory.

-see-also

COLORREF

Conceptual

GetForeColor

ITextFont

Other Resources

PALETTEINDEX

RGB

Reference

Text Object Model