CRichEditView::SetCharFormat
void SetCharFormat( CHARFORMAT cf );
Parameters
cf
structure containing the new default character formatting attributes.
Remarks
Call this function to set the character formatting attributes for new text in this CRichEditView object. Only the attributes specified by the dwMask member of cf are changed by this function.
For more information, see message and 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::GetCharFormatSelection, CRichEditView::SetParaFormat