Help Center

CTextFont2.SetForeColormethod

Windowsmethoddocumented

Syntax

FUNCTION SetForeColor (BYVAL Value AS LONG) AS HRESULT
Also documented as ForeColor — one description covers them all.

Parameters

NameDescription
ValueThe new foreground color. It can be one of the following.

Return value

The foreground color. It can be one of the ones listed above.

Description

Gets/sets the foreground, or text, color.

If Value contains an RGB color, generate the COLORREF by using the RGB macro (BGR function in FreeBasic).

Example

(GET) PROPERTY ForeColor () AS LONG (SET) PROPERTY ForeColor (BYVAL Value AS LONG)

Reference

  • Defined in AfxNova/CTextFont2.inc:576
  • Documented in Windows/WIndows Controls/RichEdit/CTextFont2 Class.md
  • Topic: CTextFont2 Class