long GetSelText( LPTSTR lpBuf ) const;
CString GetSelText( ) const;
Depends on the form:
GetSelText( lpBuf ) The number of characters copied into lpBuf, not including the null termination.
GetSelText( ) The string containing the current selection.
lpBuf - Pointer to the buffer to receive the text in the current selection.
Call this function to retrieve the text from the current selection in this CRichEditCtrl object.
If you use the first form, GetSelText( lpBuf ), you must ensure that the buffer is large enough for the text it will receive. Call GetSel to determine the number of characters in the current selection.