GetDefaultCharFormat
Retrieves the current default character formatting attributes in this RichEdit control.
DWORD GetDefaultCharFormat( CHARFORMAT & cf )
The dwMask data member of cf. It specified the default
character formatting attributes.
EX1
#include <..\OriginLab\DialogEx.h> #define IDC_RICHEDIT1 1001 void RichEdit_GetDefaultCharFormat(Dialog& EditBoxes) { RichEdit richEdit = EditBoxes.GetItem(IDC_RICHEDIT1); CHARFORMAT cf; cf.dwEffects = CFE_BOLD; cf.dwMask = CFM_STRIKEOUT|CFM_BOLD; richEdit.SetDefaultCharFormat(cf); CHARFORMAT cfResult; richEdit.GetDefaultCharFormat(cfResult); ASSERT((cfResult.dwMask&(CFM_STRIKEOUT|CFM_BOLD)) == (CFM_STRIKEOUT|CFM_BOLD)); ASSERT((cfResult.dwEffects & (CFE_STRIKEOUT|CFE_BOLD) ) == CFE_BOLD); }
RichEdit::SetDefaultCharFormat
Control.h