user32: For an owner-drawn listbox without strings WM_MEASUREITEM still needs correct itemData.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5c765431e2
commit
8b864ae9aa
|
@ -1554,7 +1554,7 @@ static LRESULT LISTBOX_InsertItem( LB_DESCR *descr, INT index,
|
|||
mis.CtlType = ODT_LISTBOX;
|
||||
mis.CtlID = id;
|
||||
mis.itemID = index;
|
||||
mis.itemData = data;
|
||||
mis.itemData = str ? (ULONG_PTR)str : data;
|
||||
mis.itemHeight = descr->item_height;
|
||||
SendMessageW( descr->owner, WM_MEASUREITEM, id, (LPARAM)&mis );
|
||||
item->height = mis.itemHeight ? mis.itemHeight : 1;
|
||||
|
|
|
@ -14387,7 +14387,7 @@ static void test_listbox_messages(void)
|
|||
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2");
|
||||
ok(ret == 2, "expected 2, got %ld\n", ret);
|
||||
|
||||
ok_sequence(wm_lb_addstring_sort_ownerdraw, "LB_ADDSTRING", TRUE);
|
||||
ok_sequence(wm_lb_addstring_sort_ownerdraw, "LB_ADDSTRING", FALSE);
|
||||
check_lb_state(listbox, 3, LB_ERR, 0, 0);
|
||||
|
||||
log_all_parent_messages--;
|
||||
|
|
Loading…
Reference in New Issue