CRichEditView编辑框,我的代码为什么不能改变文字颜色?
CString str;
CHARFORMAT cf;
str="1234567890";
str+="\r\n\r\n";
str+="0987654321";
GetRichEditCtrl().SetWindowText( str );
ZeroMemory(&cf, sizeof(CHARFORMAT));
cf.crTextColor = RGB(0, 255, 0);
GetRichEditCtrl().SetSel( 0,-1);
GetRichEditCtrl().SetSelectionCharFormat(cf);
CHARFORMAT cf;
str="1234567890";
str+="\r\n\r\n";
str+="0987654321";
GetRichEditCtrl().SetWindowText( str );
ZeroMemory(&cf, sizeof(CHARFORMAT));
cf.crTextColor = RGB(0, 255, 0);
GetRichEditCtrl().SetSel( 0,-1);
GetRichEditCtrl().SetSelectionCharFormat(cf);
...全文


