Edit_GetSel macro (windowsx.h)
Gets the starting and ending character positions of the current selection in an edit or rich edit control. You can use this macro or send the EM_GETSEL message explicitly.
DWORD Edit_GetSel(
HWND hwndCtl
);
hwndCtl
Type: HWND
A handle to the control.
Type: DWORD
The return value is a zero-based value with the starting position of the selection in the LOWORD and the position of the first character after the last selected character in the HIWORD. If either of these values exceeds 65,535, the return value is –1.
This macro does not have the complete functionality of the EM_GETSEL message, because it does not receive the 32-bit return values in the parameters of SendMessage.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | windowsx.h |