Commit 2813b43a authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

comctl32/listbox: Clear LBS_OWNERDRAWVARIABLE if LBS_OWNERDRAWFIXED is set.

parent 4c5f3849
......@@ -2520,6 +2520,8 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
if (descr->style & LBS_OWNERDRAWFIXED)
{
descr->style &= ~LBS_OWNERDRAWVARIABLE;
if( descr->lphc && (descr->lphc->dwStyle & CBS_DROPDOWN))
{
/* WinWord gets VERY unhappy if we send WM_MEASUREITEM from here */
......
......@@ -435,6 +435,8 @@ static void test_ownerdraw(void)
NULL, NULL, NULL, 0);
ok(hLB != NULL, "last error 0x%08x\n", GetLastError());
ok(GetWindowLongA(hLB, GWL_STYLE) & LBS_OWNERDRAWVARIABLE, "Unexpected window style.\n");
ret = SendMessageA(hLB, LB_INSERTSTRING, -1, 0);
ok(ret == 0, "Unexpected return value %d.\n", ret);
ret = SendMessageA(hLB, LB_INSERTSTRING, -1, 0);
......@@ -450,7 +452,6 @@ static void test_ownerdraw(void)
ok(ret == LB_OKAY, "Failed to set item height, %d.\n", ret);
ret = SendMessageA(hLB, LB_GETITEMHEIGHT, 0, 0);
todo_wine
ok(ret == 42, "Unexpected item height %d.\n", ret);
ret = SendMessageA(hLB, LB_GETITEMHEIGHT, 1, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment