Gets the starting and ending character positions of the current selection in the edit control of a combo box.
A pointer to a DWORD value that receives the starting position of the selection. This parameter can be NULL.
A pointer to a DWORD value that receives the ending position of the selection. This parameter can be NULL.
The return value is a zero-based DWORD value with the starting position of the selection in the LOWORD and with the ending position of the first character after the last selected character in the HIWORD.
The following code example shows two ways of retrieving the current selection range.
DWORD start, end; // Get the range from [out] parameters. // hwnd is the handle of the combo box control. SendMessage(hwnd, CB_GETEDITSEL, (WPARAM)&start, (LPARAM)&end; // Get the range from the return value. DWORD range = SendMessage(hwnd, CB_GETEDITSEL, NULL, NULL); start = LOWORD(range); end = HIWORD(range);
Minimum supported client
|Windows 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|