那就太好办啦.
使用CRichEditCtrl类.这个会用吧!
会用就看看这个吧!
oid CRichEditDlg::OnRichsettextcolor()
{
CHARFORMAT cf;
memset (&cf, '\0', sizeof (CHARFORMAT));
cf.dwMask = CFM_COLOR;
m_RichSample.GetSelectionCharFormat (cf);
CColorDialog cc (cf.crTextColor);
cc.m_cc.lpCustColors = m_clrCustom;
if (cc.DoModal () == IDCANCEL)
return;
cf.dwMask = CFM_COLOR;
cf.dwEffects &= ~CFE_AUTOCOLOR;
cf.crTextColor = cc.GetColor ();
m_RichSample.SetSelectionCharFormat (cf);
m_RichSample.SetFocus ();
}