user32/listbox: Don't set any data for LBS_NODATA listboxes.
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
cab591c59b
commit
d30aadd3e1
@ -2692,7 +2692,7 @@ LRESULT ListBoxWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
|
|||||||
SetLastError(ERROR_INVALID_INDEX);
|
SetLastError(ERROR_INVALID_INDEX);
|
||||||
return LB_ERR;
|
return LB_ERR;
|
||||||
}
|
}
|
||||||
descr->items[wParam].data = lParam;
|
if (!(descr->style & LBS_NODATA)) descr->items[wParam].data = lParam;
|
||||||
/* undocumented: returns TRUE, not LB_OKAY (0) */
|
/* undocumented: returns TRUE, not LB_OKAY (0) */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
@ -2104,13 +2104,10 @@ static void test_LBS_NODATA(void)
|
|||||||
|
|
||||||
/* More messages that don't work with LBS_NODATA. */
|
/* More messages that don't work with LBS_NODATA. */
|
||||||
ret = SendMessageA(listbox, LB_FINDSTRING, 1, 42);
|
ret = SendMessageA(listbox, LB_FINDSTRING, 1, 42);
|
||||||
todo_wine
|
|
||||||
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
||||||
ret = SendMessageA(listbox, LB_FINDSTRINGEXACT, 1, 42);
|
ret = SendMessageA(listbox, LB_FINDSTRINGEXACT, 1, 42);
|
||||||
todo_wine
|
|
||||||
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
||||||
ret = SendMessageA(listbox, LB_SELECTSTRING, 1, 42);
|
ret = SendMessageA(listbox, LB_SELECTSTRING, 1, 42);
|
||||||
todo_wine
|
|
||||||
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
ok(ret == LB_ERR, "Unexpected return value %d.\n", ret);
|
||||||
|
|
||||||
DestroyWindow(listbox);
|
DestroyWindow(listbox);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user