comctl32: merge WM_SIZE handling into WM_WINDOWPOSCHANGED

Daniel Jelinski djelinski1 at gmail.com
Mon Nov 12 23:40:09 CST 2012


According to "Default List-View Message Processing" page on MSDN,
listview should not handle WM_SIZE. Bug 32198 refers to an application
which subclasses listview and does not forward WM_SIZE. This patch
fixes the resulting problems.
-------------- next part --------------
From c60934a3ecdc7c9cc3dd1c693be4a9c6e9530af0 Mon Sep 17 00:00:00 2001
From: Daniel Jelinski <djelinski1 at gmail.com>
Date: Mon, 12 Nov 2012 19:03:24 +0100
Subject: comctl32: merge WM_SIZE handling into WM_WINDOWPOSCHANGED

should fix bug 32198
---
 dlls/comctl32/listview.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 2525dfe..eb100bc 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -11584,9 +11584,6 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
   case WM_SHOWWINDOW:
     return LISTVIEW_ShowWindow(infoPtr, wParam, lParam);
 
-  case WM_SIZE:
-    return LISTVIEW_Size(infoPtr, (short)LOWORD(lParam), (short)HIWORD(lParam));
-
   case WM_STYLECHANGED:
     return LISTVIEW_StyleChanged(infoPtr, wParam, (LPSTYLESTRUCT)lParam);
 
@@ -11619,6 +11616,7 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
       {
           if (notify_measureitem(infoPtr)) LISTVIEW_InvalidateList(infoPtr);
       }
+      LISTVIEW_Size(infoPtr, ((WINDOWPOS *)lParam)->cx, ((WINDOWPOS *)lParam)->cy);
       }
       return DefWindowProcW(hwnd, uMsg, wParam, lParam);
 
-- 
1.7.5.4


More information about the wine-patches mailing list