CRichEditCtrl::GetSelectionCharFormat
TOC
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

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.

The dwMask data member of cf. It specifies the character formatting attributes that are consistent throughout the current selection.

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 Platform SDK.

See the example for SetSelectionCharFormat.

Show:
© 2016 Microsoft