comctl32/listview: update dwStyle before checking for scrollbar

Daniel Jelinski djelinski1 at gmail.com
Fri Sep 21 15:07:54 CDT 2012


-------------- next part --------------
From c99254ecdc04092322009c0a7679972905ba3b53 Mon Sep 17 00:00:00 2001
From: Daniel Jelinski <djelinski1 at gmail.com>
Date: Fri, 21 Sep 2012 21:58:43 +0200
Subject: comctl32/listview: update dwStyle before checking for scrollbar

dwStyle is updated only in WM_STYLECHANGED, which is not sent
when displaying and hiding scrollbars.
Fixes the issue where there was a large margin between items
and horizontal scrollbar (e.g. in file open dialog).
---
 dlls/comctl32/listview.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 7a11557..bba1dec 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -10878,6 +10878,7 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr)
 	 * The "2" is there to mimic the native control. I think it may be
 	 * related to either padding or edges.  (GLA 7/2002)
 	 */
+	infoPtr->dwStyle = GetWindowLongPtrW(infoPtr->hwndSelf, GWL_STYLE);
 	if (!(infoPtr->dwStyle & WS_HSCROLL))
 	    infoPtr->rcList.bottom -= GetSystemMetrics(SM_CYHSCROLL);
         infoPtr->rcList.bottom = max (infoPtr->rcList.bottom - 2, 0);
-- 
1.7.5.4


More information about the wine-patches mailing list