SetTextColor
Set text color in this RichEdit control.
BOOL SetTextColor( long nStartChar, long nEndChar, COLORREF cr )
Nonzero if successful; otherwise, 0.
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); }
Control.h