here is a small example of how to highlight all instances of a word in a rich text box based off of the users selection. Highlights backcolor of text as well. Highlights are also removed when text is deselected or a new selection is made.
I kind of wanted it to be live highlighting as a selection is made instead of working through the SelChange() event which triggers onMouseUp but I couldnt find any examples in a brief web search, and nothing jumped out at me using Spy++. Plus its probably not worth subclassing for that small of a feature.