The EM_EXGETSEL message retrieves the starting and ending character positions of the selection in a rich edit control.
EM_EXGETSEL
wParam = 0;
lParam = (LPARAM) (CHARRANGE FAR *) lpchr;
No return value.
Windows NT: Requires version 3.51 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in richedit.h.
Rich Edit Controls Overview, Rich Edit Messages, CHARRANGE