diff --git a/reactos/subsystems/win32/win32k/ntuser/window.c b/reactos/subsystems/win32/win32k/ntuser/window.c index 08199e5dc1b..ed791202750 100644 --- a/reactos/subsystems/win32/win32k/ntuser/window.c +++ b/reactos/subsystems/win32/win32k/ntuser/window.c @@ -1692,11 +1692,19 @@ co_IntCreateWindowEx(DWORD dwExStyle, dwExStyle |= WS_EX_WINDOWEDGE; else dwExStyle &= ~WS_EX_WINDOWEDGE; -/* - These affect only the style loading into the WindowObject structure. -*/ - Window->ExStyle = dwExStyle; - Window->Style = dwStyle & ~WS_VISIBLE; + + /* Correct the window style. */ + if (!(dwStyle & WS_CHILD)) + { + dwStyle |= WS_CLIPSIBLINGS; + DPRINT("3: Style is now %lx\n", dwStyle); + if (!(dwStyle & WS_POPUP)) + { + dwStyle |= WS_CAPTION; + Window->Flags |= WINDOWOBJECT_NEED_SIZE; + DPRINT("4: Style is now %lx\n", dwStyle); + } + } /* create system menu */ if((dwStyle & WS_SYSMENU) && @@ -1710,23 +1718,6 @@ co_IntCreateWindowEx(DWORD dwExStyle, } } - /* Correct the window style. */ - if (!(Window->Style & WS_CHILD)) - { - Window->Style |= WS_CLIPSIBLINGS; - if (!(Window->Style & WS_POPUP)) - { - Window->Style |= WS_CAPTION; - Window->Flags |= WINDOWOBJECT_NEED_SIZE; - } - } - - if ((Window->ExStyle & WS_EX_DLGMODALFRAME) || - (Window->Style & (WS_DLGFRAME | WS_THICKFRAME))) - Window->ExStyle |= WS_EX_WINDOWEDGE; - else - Window->ExStyle &= ~WS_EX_WINDOWEDGE; - /* Insert the window into the thread's window list. */ InsertTailList (&PsGetWin32Thread()->WindowListHead, &Window->ThreadListEntry); @@ -1742,6 +1733,9 @@ co_IntCreateWindowEx(DWORD dwExStyle, Size.cx = nWidth; Size.cy = nHeight; + Window->ExStyle = dwExStyle; + Window->Style = dwStyle & ~WS_VISIBLE; + /* call hook */ Cs.lpCreateParams = lpParam; Cs.hInstance = hInstance;