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. |
|
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 |
|
|
|
|
|
|
Sets the foreground (text) color.
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.
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 |
---|---|
|
Invalid argument. |
|
The font object is attached to a range that has been deleted. |
|
Write access is denied. |
|
Insufficient memory. |
Conceptual
Other Resources
Reference