ALL,
From MSDN
typedef struct _charformat2 {
UINT cbSize;
DWORD dwMask;
DWORD dwEffects;
LONG yHeight;
LONG yOffset;
COLORREF crTextColor;
BYTE bCharSet;
BYTE bPitchAndFamily;
TCHAR szFaceName[LF_FACESIZE];
WORD wWeight;
SHORT sSpacing;
COLORREF crBackColor;
LCID lcid;
#if (_RICHEDIT_VER >= 0x0500)
union {
DWORD dwReserved;
DWORD dwCookie;
};
#else
DWORD dwReserved;
#endif
SHORT sStyle;
WORD wKerning;
BYTE bUnderlineType;
BYTE bAnimation;
BYTE bRevAuthor;
#if (_RICHEDIT_VER >= 0x0800)
BYTE bUnderlineColor;
#endif
} CHARFORMAT2;
The underline color is declared only for the control version >= 0x0800. However what should I do for the previous versions?
Also it looks like on Windows 8.1 this variable is not available. That is according to MSVC 2010.
So how do I make the bUnderlineType display the "red wave" underline and not use the standard black color?
Thank you.
[EDIT] Sorry, I just recently found this contradiction in MSDN... While this page says it is available in the RichEdit 4.1+, this page says it is available in the RichEdit 3.0+. Now I know nobody cares about RichEdit 1.0, but a lot of systems are still using XP, whhich is 3.0, since MS Word does have the red squiggly underlining there. Trouble is - while the underlinetype setting is pretty straightforward, the coloring of the underline on 3.0 is not. Anybody have an idea of what to do? [/EDIT]