diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index b9824422409..6715a26b631 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -1222,9 +1222,10 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) /* WS_VISIBLE should be turned off yet */ style = createwnd->lpcs->style & ~WS_VISIBLE; - ok(style == GetWindowLongA(hwnd, GWL_STYLE), - "style of hwnd and style in the CREATESTRUCT do not match: %08x != %08x\n", - GetWindowLongA(hwnd, GWL_STYLE), style); + todo_wine_if(!(style & WS_CLIPSIBLINGS) && (!(style & WS_CHILD) || (style & WS_POPUP))) + ok(style == GetWindowLongA(hwnd, GWL_STYLE), + "style of hwnd and style in the CREATESTRUCT do not match: %08x != %08x\n", + GetWindowLongA(hwnd, GWL_STYLE), style); if (0) { @@ -4444,9 +4445,8 @@ static LRESULT WINAPI cbt_proc(int ncode, WPARAM wparam, LPARAM lparam) ts = c->lpcs->lpCreateParams; ok(ts != NULL, "lpCreateParams not set\n"); - todo_wine_if(!(ts->cs_style & WS_CHILD) || (ts->cs_style & WS_POPUP)) - ok(c->lpcs->style == ts->cs_style, "style = 0x%08x, expected 0x%08x\n", - c->lpcs->style, ts->cs_style); + ok(c->lpcs->style == ts->cs_style, "style = 0x%08x, expected 0x%08x\n", + c->lpcs->style, ts->cs_style); ok(c->lpcs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08x, expected 0x%08x\n", c->lpcs->dwExStyle, ts->cs_exstyle); diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 21214432b6d..081d21a95d0 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -1706,7 +1706,6 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, } else SetWindowLongPtrW( hwnd, GWLP_ID, (ULONG_PTR)cs->hMenu ); - style = wndPtr->dwStyle; win_dpi = wndPtr->dpi; WIN_ReleasePtr( wndPtr ); @@ -1716,12 +1715,7 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, /* call the WH_CBT hook */ - /* the window style passed to the hook must be the real window style, - * rather than just the window style that the caller to CreateWindowEx - * passed in, so we have to copy the original CREATESTRUCT and get the - * the real style. */ cbcs = *cs; - cbcs.style = style; cbtc.lpcs = &cbcs; cbtc.hwndInsertAfter = HWND_TOP; if (HOOK_CallHooks( WH_CBT, HCBT_CREATEWND, (WPARAM)hwnd, (LPARAM)&cbtc, unicode )) goto failed;