Draw "red squiggly line" in CHtmlEditCtrl
Asked Answered
C

1

7

I am working on building spellchecking functionality into my app which currently uses MFC's CHtmlEditCtrl control.

Is there a way of drawing one of those "red squiggly lines" that you see under spelling errors on the HTML control, underneath the word that I detect to be a spelling error?

The only way I can think of is to use the actual HTML to apply this style, and then strip it out upon the email being sent. This seems rather messy, as if the user starts applying underline styles to the text they could interfere with it.

Is there a way of doing this with drawing?

Thanks in advance.

Carlynne answered 11/2, 2016 at 23:19 Comment(2)
groups.google.com/forum/#!topic/csexwb/LMEC8k3z16IAdonai
Yes I saw that Google group, the issue is isn't that one using the html underlining which will be retained when I save the html?Carlynne
B
1

The interface you want is IHTMLRenderStyle. You pass this, once filled in, to the AddSegment method of the of the IHighlightRenderingServices interface. Here's an example in (gasp) VB. I've done it in C++, years ago now though, and it worked nicely.

Boxcar answered 14/2, 2016 at 15:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.