From c7d034219e2602e558b10ce976314ba82c5da33b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Zalewski?= Date: Thu, 28 Sep 2006 20:58:19 +0200 Subject: [PATCH] comctl32: toolbar: Small fix in TOOLBAR_StyleChanged. --- dlls/comctl32/toolbar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 4f725edb90f..945b40bb88d 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -6741,6 +6741,8 @@ TOOLBAR_StyleChanged (HWND hwnd, INT nType, LPSTYLESTRUCT lpStyle) if (nType == GWL_STYLE) { + DWORD dwOldStyle = infoPtr->dwStyle; + if (lpStyle->styleNew & TBSTYLE_LIST) infoPtr->dwDTFlags = DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS; else @@ -6753,7 +6755,7 @@ TOOLBAR_StyleChanged (HWND hwnd, INT nType, LPSTYLESTRUCT lpStyle) infoPtr->dwStyle = lpStyle->styleNew; /* only resize if one of the CCS_* styles was changed */ - if ((infoPtr->dwStyle ^ lpStyle->styleNew) & COMMON_STYLES) + if ((dwOldStyle ^ lpStyle->styleNew) & COMMON_STYLES) { TOOLBAR_AutoSize (hwnd);