Help Center

CRichEditCtx.GetTextColormethod

Windowsmethoddocumented

Syntax

FUNCTION GetTextColor () AS COLORREF
Also documented as TextColor — one description covers them all.

Parameters

NameDescription
crTxtColorThe new text color. Use the macro RGB (BGR in FreeBasic), e.g. BGR(255,0,0).

Return value

(GET) The color of the selected text or the word under the cursor if there is not selection.

(SET) A boolean true (-1) or false (0).

Description

Gets/sets the color of the selected text or the word under the cursor.

Remarks

To select text programatically, use the SetSel method.

Example

(GET) PROPERTY TextColor () AS COLORREF (SET) PROPERTY TextColor (BYVAL crTxtColor AS COLORREF)

Reference

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