mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 14:34:51 +00:00
comctl32/listbox: Make LBS_NODATA listboxes error on any attempt to find a value.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
19f26c35d5
commit
0b7dbc9e19
|
@ -880,6 +880,8 @@ static INT LISTBOX_FindString( LB_DESCR *descr, INT start, LPCWSTR str, BOOL exa
|
|||
INT i;
|
||||
LB_ITEMDATA *item;
|
||||
|
||||
if (descr->style & LBS_NODATA) return LB_ERR;
|
||||
|
||||
if (start >= descr->nb_items) start = -1;
|
||||
item = descr->items + start + 1;
|
||||
if (HAS_STRINGS(descr))
|
||||
|
|
|
@ -2309,10 +2309,16 @@ static void test_LBS_NODATA(void)
|
|||
}
|
||||
|
||||
/* More messages that don't work with LBS_NODATA. */
|
||||
ret = SendMessageA(listbox, LB_FINDSTRING, 1, 0);
|
||||
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
||||
ret = SendMessageA(listbox, LB_FINDSTRING, 1, 42);
|
||||
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
||||
ret = SendMessageA(listbox, LB_FINDSTRINGEXACT, 1, 0);
|
||||
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
||||
ret = SendMessageA(listbox, LB_FINDSTRINGEXACT, 1, 42);
|
||||
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
||||
ret = SendMessageA(listbox, LB_SELECTSTRING, 1, 0);
|
||||
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
||||
ret = SendMessageA(listbox, LB_SELECTSTRING, 1, 42);
|
||||
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
||||
|
||||
|
|
Loading…
Reference in a new issue