Reputation:
Either C++ or C# solutions are welcome.
I have the index of a character in a text displayed in a RichEditCtrl. I need to know its format (is it bold, red, etc) without selecting it.
Thank you all.
Upvotes: 0
Views: 279
Reputation: 6040
Using the base CRichEditCtrl, there is no way to get the format of a char without selecting it. If you don't want to change the selection, then save the start/end position of the current selection, select the character you want the format of, call CRichEditCtrl::GetSelectionCharFormat(), and then restore the original selection of the rich edit control.
Upvotes: 0