CRichEditCtrl::GetSelectionCharFormat
Gets the character formatting attributes of the current selection.
DWORD GetSelectionCharFormat(
CHARFORMAT& cf
) const;
DWORD GetSelectionCharFormat(
CHARFORMAT2& cf
) const;
Parameters
cf
In the first version, a pointer to a CHARFORMAT structure to receive the character formatting attributes of the current selection.In the second version, a pointer to a CHARFORMAT2 structure, which is a Rich Edit 2.0 extension to the CHARFORMAT structure to receive the character formatting attributes of the current selection.
Return Value
The dwMask data member of cf. It specifies the character formatting attributes that are consistent throughout the current selection.
Remarks
The cf parameter receives the attributes of the first character in the current selection. The return value specifies which attributes are consistent throughout the selection.
For more information, see the EM_GETCHARFORMAT message and the CHARFORMAT and CHARFORMAT2 structures in the Windows SDK.
Example
See the example for SetSelectionCharFormat.
Requirements
Header: afxcmn.h
See Also
Reference
CRichEditCtrl::GetDefaultCharFormat