[PATCH v3 6/8] comctl32/listbox: Clear LBS_OWNERDRAWVARIABLE if LBS_OWNERDRAWFIXED is set
Gabriel Ivăncescu
gabrielopcode at gmail.com
Thu Nov 8 05:39:53 CST 2018
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/comctl32/listbox.c | 3 +++
dlls/comctl32/tests/listbox.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c
index 0a7c341..5e33466 100644
--- a/dlls/comctl32/listbox.c
+++ b/dlls/comctl32/listbox.c
@@ -2523,6 +2523,9 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
if (descr->style & LBS_OWNERDRAWFIXED)
{
+ /* Windows accepts both, but FIXED overrides VARIABLE */
+ descr->style &= ~LBS_OWNERDRAWVARIABLE;
+
if( descr->lphc && (descr->lphc->dwStyle & CBS_DROPDOWN))
{
/* WinWord gets VERY unhappy if we send WM_MEASUREITEM from here */
diff --git a/dlls/comctl32/tests/listbox.c b/dlls/comctl32/tests/listbox.c
index 47498ca..7429144 100644
--- a/dlls/comctl32/tests/listbox.c
+++ b/dlls/comctl32/tests/listbox.c
@@ -457,7 +457,7 @@ static void test_both_ownerdraw(void)
ok(ret == LB_OKAY, "LB_SETITEMHEIGHT failed: %d\n", ret);
ret = SendMessageA(hLB, LB_GETITEMHEIGHT, 0, 0);
- todo_wine ok(ret == 42, "LBS_OWNERDRAWFIXED did not override LBS_OWNERDRAWVARIABLE, got height %d\n", ret);
+ ok(ret == 42, "LBS_OWNERDRAWFIXED did not override LBS_OWNERDRAWVARIABLE, got height %d\n", ret);
DestroyWindow (hLB);
}
--
2.19.1
More information about the wine-devel
mailing list