Export (0) Print
Expand All

Edit_GetSel macro

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.

Syntax


DWORD Edit_GetSel(
  HWND hwndCtl
);

Parameters

hwndCtl

Type: HWND

A handle to the control.

Return value

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.

Remarks

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.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Windowsx.h

 

 

Community Additions

ADD
Show:
© 2015 Microsoft