CRichEditView::GetCharFormatSelection
CHARFORMAT& GetCharFormatSelection( );
Return Value
A structure which contains the character formatting attributes of the current selection.
Remarks
Call this function to get the character formatting attributes of the current selection.
For more information, see the message and the structure in the Win32 documentation.
Example
void CMyRichEditView::OnCharUnderline ()
{
CHARFORMAT cf;
cf = GetCharFormatSelection ();
if (!(cf.dwMask & CFM_UNDERLINE) || !(cf.dwEffects & CFE_UNDERLINE))
cf.dwEffects = CFE_UNDERLINE;
else
cf.dwEffects = 0;
cf.dwMask = CFM_UNDERLINE;
SetCharFormat (cf);
}
CRichEditView Overview | Class Members | Hierarchy Chart
See Also CRichEditView::SetCharFormat, CRichEditView::GetParaFormatSelection, CRichEditCtrl::GetSelectionCharFormat