CEdit控件不支持部分文字修改字体和颜色,而CRichEditCtrl可以支持。
CRichEditCtrl &edit = GetRichEditCtrl();
CHARFORMAT cf;memset(&cf, 0, sizeof(CHARFORMAT));
edit.GetSelectionCharFormat(cf);
cf.cbSize = sizeof(cf);
cf.dwEffects &= ~CFE_AUTOCOLOR;
//打开字体开关
cf.dwMask |= CFM_COLOR;//颜色cf.dwMask |&#