RichEdit::SetTextColor

Description

Set text color in this RichEdit control.

Syntax

BOOL SetTextColor( long nStartChar, long nEndChar, COLORREF cr )

Parameters

nStartChar
Zero-based index of the first character in the current selection.
nEndChar
Zero-based index of the last character in the current selection.
cr
Specifies the color to to be used for seleted text.

Return

Nonzero if successful; otherwise, 0.

Examples

EX1

#include <..\OriginLab\DialogEx.h>
#define IDC_RICHEDIT1 1001

void RichEdit_SetTextColor(Dialog& EditBoxes)
{
        RichEdit richEdit = EditBoxes.GetItem(IDC_RICHEDIT1);
        COLORREF cr = RGB(255, 0, 0);
        richEdit.SetTextColor(0, 100, cr);
}

Remark

See Also

header to Include

Control.h