in my application I'm using a CRichEditCtrl on a PropertyPage to design context specific help texts. For this, I have to set double underline and hidden style to selected text portions. The usual CHARFORMAT doesn't support this.
In \MSDEV\INCLUDE\RICHEDIT.H there is a CHARFORMAT2 which has such flags and I derived a new Class from CRichEditCtrl to overwrite SetSelectionCharFormat() to have a correct dwSize set before posting the message.
BOOL CMyRichEditCtrl::SetSelectionCharFormat(CHARFORMAT2 &cf)
cf.cbSize = sizeof(CHARFORMAT2);
return (BOOL)::SendMessage(m_hWnd, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
But this has no effect. Neither the new styles are visible (which is ok coz it's mensioned in RICHEDIT.H) nor the styles are stored when streaming out with SF_RTF.
Does anyone have an idea? Answers are highly appreciated. Thanx in advance.
Environment: WIN NT 4.0, MSVC 4.2