I have a hander for OnEnChange in my view. In it, I parse the line where
the cursor is and set the color for certain portions of the text.
To set the color, I set the selection to the portion I want to color, and
then do the following:
CHARFORMAT2 cf;
cf.dwMask = CFM_COLOR;
cf.crTextColor = COLOR_KEYWORD;
GetRichEditCtrl().SetSelectionCharFormat(cf);
where COLOR_KEYWORD is defined as:
RGB(0,128,0)
SetSelectionCharFormat is returning true, however, the color does not
actually change in the view.
I've tried using both just CHARFORMAT and CHARFORMAT2, both have the same
effect - nothing.
Any ideas?
--
Adam Clauss
ca*****@tamu.edu