在 CHtmlEditCtrl 中绘制 "red squiggly line"

Draw "red squiggly line" in CHtmlEditCtrl

我正在努力将拼写检查功能构建到我的应用程序中,该应用程序目前使用 MFC 的 CHtmlEditCtrl 控件。

有没有办法在 HTML 控件的拼写错误下,在我检测到的拼写错误的单词下面画出 "red squiggly lines" 中的一个?

我能想到的唯一方法是使用实​​际的 HTML 应用此样式,然后在发送电子邮件时将其删除。这看起来相当混乱,好像用户开始将下划线样式应用到他们可能会干扰的文本。

有没有办法用绘图来做到这一点?

提前致谢。

你想要的界面是 IHTMLRenderStyle. You pass this, once filled in, to the AddSegment method of the of the IHighlightRenderingServices interface. Here's an example in (gasp) VB。我已经在几年前用 C++ 完成了,但效果很好。