I'd like to use Rich edit control's underline color in MFC
but, in afxwin.h, _RICHEDIT_VER define 0x210. like this,
#define _RICHEDIT_VER 0x0210
I'm loading 'msftedit.dll'(8.1 Version) and Windows10 SDK (10.0.16299.0) but, bUnderlineColor is coded in Richedit.h
#if (_RICHEDIT_VER >= 0x0800)
BYTE bUnderlineColor; // Underline color
#endif
If I don't use wrapping class(CRichEditCtrl), Can I use this in MFC project. and How?
You can declare your own structure and add
bUnderlineColor. Use this inCRichEdit::SendMessage(EM_SETCHARFORMAT...)This method is hack though. Maybe there is a better way to convince MFC to cooperate.
Requires initial call to
AfxInitRichEdit()Rich edit control has to be created manually with
Create(not usingSubclassDlgItemorDDX_Control), example:Result:
