【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.6.27.30 RichEdit::SetTextColor
Contents
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