EM_GETSELTEXT

The EM_GETSELTEXT message retrieves the currently selected text in a rich edit control.

EM_GETSELTEXT 
wParam = 0; 
lParam = (LPARAM) (LPSTR) lpBuf; 
 

Parameters

lpBuf
Pointer to a buffer that receives the selected text. The calling application must ensure that the buffer is large enough to hold the selected text.

Return Values

Returns the number of characters copied, not including the terminating null character.

QuickInfo

  Windows NT: Requires version 3.51 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in richedit.h.

See Also

Rich Edit Controls Overview, Rich Edit Messages