WORD GetSelectionType( ) const;
Return Value
Flags indicating the contents of the current selection. A combination of the following flags:
Remarks
Call this function to determine the selection type in this CRichEditCtrl object.
For more information, see EM_SELECTIONTYPE in the Win32 documentation.
Example
// The pointer to my rich edit control.
extern CRichEditCtrl* pmyRichEditCtrl;
// Dump the selection text only if it contains at least one text character.
if (pmyRichEditCtrl->GetSelectionType() & (SEL_TEXT | SEL_MULTICHAR))
{
CString strText = pmyRichEditCtrl->GetSelText();
TRACE(TEXT("selection text is '%s'.\r\n"), (LPCSTR) strText);
}