CRichEditCtrl::GetSelectionType
Bestimmt die Auswahl in CRichEditCtrl dieses Objekt.
WORD GetSelectionType( ) const;
Rückgabewert
Flags, die den Inhalt der aktuellen Auswahl angeben. Eine Kombination der folgenden Flags:
SEL_EMPTY gibt an, dass keine aktuelle Auswahl vorhanden ist.
SEL_TEXT gibt an, dass die aktuelle Auswahl Text enthält.
SEL_OBJECT gibt an, dass die aktuelle Auswahl mindestens ein OLE-Element enthält.
SEL_MULTICHAR gibt an, dass die aktuelle Auswahl mehrere Zeichen Text enthält.
SEL_MULTIOBJECT gibt an, dass die aktuelle Auswahl mehr als ein OLE-Objekt enthält.
Hinweise
Weitere Informationen finden Sie unter EM_SELECTIONTYPE in Windows SDK.
Beispiel
// Dump the selection text only if it contains at least one text character.
if (m_myRichEditCtrl.GetSelectionType() & (SEL_TEXT | SEL_MULTICHAR))
{
CString strText = m_myRichEditCtrl.GetSelText();
TRACE(_T("selection text is '%s'.\r\n"), strText);
}
Anforderungen
Header: afxcmn.h