Made LB_GETCURSEL return focus_item if no item has been selected.

This commit is contained in:
Lawson Whitney 1999-03-22 14:46:43 +00:00 committed by Alexandre Julliard
parent cc5d924b63
commit 613092a6a5
1 changed files with 3 additions and 0 deletions

View File

@ -2229,6 +2229,9 @@ LRESULT WINAPI ListBoxWndProc( HWND hwnd, UINT msg,
case LB_GETCURSEL16:
case LB_GETCURSEL:
retvalue = descr->selected_item;
if (retvalue == -1) retvalue = descr->focus_item;
/* otherwise, if the user tries to move the selection with the */
/* arrow keys, we will give the application something to choke on */
goto END;
case LB_GETTOPINDEX16: