Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Microsoft Words spell-checker underlines misspelled words with a red wavy underline. Can RichEdit controls do this?

0
Posted

Microsoft Words spell-checker underlines misspelled words with a red wavy underline. Can RichEdit controls do this?

0

There are two parts to this question: (1) Can you create a wavy underline and (2) can you color the underline red while leaving the text color unchanged. RichEdit 1.0 supports only a plain underline and the color cannot be separately specified. RichEdit 2.0 supports at least a couple of underline types (single, double, and word) according to the documentation. RichEdit 3.0 supports even more underline styles including thick, wave, dash, dash-dot, dash-dot-dot, and dotted (I have not verified that they all work; the wavy style *does* work). Since setting the underline color to a different color than the text is listed as a RichEdit 3.0 enhancement, I assume that it does not work with prior versions. However, many RE 2.0 features are undocumented, so it may be worth trying if you are using RE 2.0. All of that said, here is how it works: Set the lower nibble of the CHARFORMAT2 bUnderlineType to the desired underline style and set the upper nibble of bUnderlineType to values of 1 to 15 (0x

Related Questions

Thanksgiving questions

*Sadly, we had to bring back ads too. Hopefully more targeted.