From 9188b58e4c29df998a8af83bba2254d34594c0c8 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 7 Jan 2012 21:36:12 +0300 Subject: [PATCH] comctl32: Store style bits provided with WM_CREATE. --- dlls/comctl32/tests/toolbar.c | 1 - dlls/comctl32/toolbar.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 22ad75c7239..5049ef66ea2 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -1658,7 +1658,6 @@ static void test_get_set_style(void) style = SendMessageA(hToolbar, TB_GETSTYLE, 0, 0); style2 = GetWindowLongA(hToolbar, GWL_STYLE); -todo_wine ok(style == style2, "got 0x%08x, expected 0x%08x\n", style, style2); /* try to alter common window bits */ diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 3868967c21c..fa67eb816ef 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -5151,12 +5151,11 @@ static LRESULT TOOLBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs) { TOOLBAR_INFO *infoPtr = (TOOLBAR_INFO *)GetWindowLongPtrW(hwnd, 0); - DWORD dwStyle = GetWindowLongW (hwnd, GWL_STYLE); LOGFONTW logFont; TRACE("hwnd = %p, style=0x%08x\n", hwnd, lpcs->style); - infoPtr->dwStyle = dwStyle; + infoPtr->dwStyle = lpcs->style; GetClientRect(hwnd, &infoPtr->client_rect); infoPtr->bUnicode = infoPtr->hwndNotify && (NFR_UNICODE == SendMessageW(hwnd, WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_REQUERY)); @@ -5167,7 +5166,7 @@ TOOLBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs) OpenThemeData (hwnd, themeClass); - TOOLBAR_CheckStyle (infoPtr, dwStyle); + TOOLBAR_CheckStyle (infoPtr, infoPtr->dwStyle); return 0; } -- 2.11.4.GIT