Changing the selection color of a CRichEditView
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Does anybody know how to change the selection color of a CRichEditView? Thank you in advance...
CHARFORMAT cf; CRichEditCtrl& r = GetRichEditCtrl().GetSelectionCharFormat(cf); long iStart, iEnd; r.GetSel(iStart, iEnd); r.GetSelectionCharFormat(cf); cf.dwEffects ^= CFE_AUTOCOLOR; cf.crTextColor = RGB(163, 15, 200); //Choisi ta couleur cf.dwMask |= CFM_COLOR; r.SetSelectionCharFormat(cf);