mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 13:27:35 +00:00
Fixed LB_GETCURSEL message to return LB_ERR on empty list.
This commit is contained in:
parent
8e7cb4db7a
commit
8730e4572d
1 changed files with 7 additions and 2 deletions
|
@ -2228,8 +2228,13 @@ LRESULT WINAPI ListBoxWndProc( HWND hwnd, UINT msg,
|
|||
|
||||
case LB_GETCURSEL16:
|
||||
case LB_GETCURSEL:
|
||||
retvalue = descr->selected_item;
|
||||
if (retvalue == -1) retvalue = descr->focus_item;
|
||||
if (descr->nb_items==0)
|
||||
retvalue = LB_ERR;
|
||||
else
|
||||
{
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue