[PATCH v2 4/8] comctl32/listbox: Clear LBS_OWNERDRAWVARIABLE if LBS_OWNERDRAWFIXED is set

Gabriel Ivăncescu gabrielopcode at gmail.com
Tue Nov 6 05:30:56 CST 2018


Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---

Spotted by tests and it simply makes no sense to have both (see next patch).

 dlls/comctl32/listbox.c | 3 +++
 1 file changed, 3 insertions(+)

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 */
-- 
2.19.1




More information about the wine-devel mailing list