comctl32/listbox: Fix redraw after LB_SETCOUNT message.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Akihiro Sagawa 2021-08-12 21:17:45 +09:00 committed by Alexandre Julliard
parent d3cb9a2961
commit a056663efb
2 changed files with 2 additions and 1 deletions

View File

@ -1830,6 +1830,8 @@ static LRESULT LISTBOX_SetCount( LB_DESCR *descr, UINT count )
if (!resize_storage(descr, count))
return LB_ERRSPACE;
descr->nb_items = count;
if (descr->style & LBS_NOREDRAW)
descr->style |= LBS_DISPLAYCHANGED;
if (count)
{

View File

@ -569,7 +569,6 @@ static void test_ownerdraw(void)
got_drawitem = 0;
ret = RedrawWindow(hLB, NULL, 0, RDW_UPDATENOW);
ok(ret, "RedrawWindow failed\n");
todo_wine_if(testcase[i].message == LB_SETCOUNT)
ok(got_drawitem == testcase[i].drawitem, "expected %u, got %u\n", testcase[i].drawitem, got_drawitem);
DestroyWindow(hLB);