This documentation is archived and is not being maintained.

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: