Microsoft Words spell-checker underlines misspelled words with a red wavy underline. Can RichEdit controls do this?
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