首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

【请问】怎么更改RichEditCtrl中文本的颜色?

2012-01-26 
【请教】如何更改RichEditCtrl中文本的颜色??CStringstr1,str2str1 thisisaricheditbox+\r\n str2 th

【请教】如何更改RichEditCtrl中文本的颜色??
CString   str1,str2;

str1= "this   is   a   richeditbox+\r\n ";
str2= "this   is   not   a   richeditbox+\r\n ";

str2+=str1;
m_RichEdit.SetWindowText(str2);   //m_RichEdit是CRichEditCtrl型变量

请教在输出这两行字符时如何让第一行显示红色第二行显示黑色??

[解决办法]
http://www.vckbase.com/code/viewcode.asp?id=1269

给你一个例子:

其中的命令selectcolor

热点排行