CHARFORMAT cf;
m_Content.GetDefaultCharFormat(cf);
cf.cbSize=10;
DWORD dwEffects = 0;
cf.dwEffects = dwEffects;
cf.dwMask = CFM_BOLD | CFM_COLOR|CFM_SIZE;
cf.crTextColor = RGB(255,0,0);
m_Content.SetDefaultCharFormat(cf);
m_Content.SetWindowText(l_svDisplayText); 这样可以设置RichEdit中的字体颜色,但是所有文本颜色都改变!!
m_Content.GetDefaultCharFormat(cf);
cf.cbSize=10;
DWORD dwEffects = 0;
cf.dwEffects = dwEffects;
cf.dwMask = CFM_BOLD | CFM_COLOR|CFM_SIZE;
cf.crTextColor = RGB(255,0,0);
m_Content.SetDefaultCharFormat(cf);
m_Content.SetWindowText(l_svDisplayText); 这样可以设置RichEdit中的字体颜色,但是所有文本颜色都改变!!
CHARFORMAT cf;
m_Content.GetDefaultCharFormat(cf);
cf.cbSize=10;
DWORD dwEffects = 0;
cf.dwEffects = dwEffects;
cf.dwMask = CFM_BOLD | CFM_COLOR|CFM_SIZE;
cf.crTextColor = RGB(255,0,0);
m_Content.SetSel(1,7);
m_Content.SetSelectionCharFormat(cf);