下面代码用于改变一段字符的颜色,我想你的问题应该可以解决!
m_RichEditCtrl.SetWindowText("this is test");
m_RichEditCtrl.SetSel(0,10);CHARFORMAT cf;
cf.dwMask = CFM_STRIKEOUT|CFM_BOLD|CFM_COLOR;
cf.dwEffects = CFE_BOLD;
cf.crTextColor = RGB(255,0,0);
m_RichEditCtrl.SetSelectionCharFormat(cf);
m_RichEditCtrl.SetWindowText("this is test");
m_RichEditCtrl.SetSel(0,10);CHARFORMAT cf;
cf.dwMask = CFM_STRIKEOUT|CFM_BOLD|CFM_COLOR;
cf.dwEffects = CFE_BOLD;
cf.crTextColor = RGB(255,0,0);
m_RichEditCtrl.SetSelectionCharFormat(cf);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货