Author: gadamopoulos
Date: Sun May 16 11:26:35 2010
New Revision: 47237
URL: 
http://svn.reactos.org/svn/reactos?rev=47237&view=rev
Log:
[win32]
-Call HCBT_CREATEWND, WM_NCCREATE and WM_CREATE with correct style and position
-Fixes some user32:win tests
Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Sun May 16 11:26:35
2010
@@ -1998,14 +1998,16 @@
    else
       dwExStyle &= ~WS_EX_WINDOWEDGE;
+   Wnd->style = dwStyle & ~WS_VISIBLE;
+
    /* Correct the window style. */
-   if (!(dwStyle & WS_CHILD))
-   {
-      dwStyle |= WS_CLIPSIBLINGS;
+   if ((Wnd->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
+   {
+      Wnd->style |= WS_CLIPSIBLINGS;
       DPRINT("3: Style is now %lx\n", dwStyle);
-      if (!(dwStyle & WS_POPUP))
-      {
-         dwStyle |= WS_CAPTION;
+      if (!(Wnd->style & WS_POPUP))
+      {
+         Wnd->style |= WS_CAPTION;
          Window->state |= WINDOWOBJECT_NEED_SIZE;
          DPRINT("4: Style is now %lx\n", dwStyle);
       }
@@ -2066,7 +2068,6 @@
    Size.cy = nHeight;
    Wnd->ExStyle = dwExStyle;
-   Wnd->style = dwStyle & ~WS_VISIBLE;
    /* call hook */
    Cs.lpCreateParams = lpParam;
@@ -2099,6 +2100,8 @@
    y = Cs.y;
    nWidth = Cs.cx;
    nHeight = Cs.cy;
+
+   Cs.style = dwStyle;
 // FIXME: Need to set the Z order in the window link list if the hook callback changed
it!
 //   hwndInsertAfter = CbtCreate.hwndInsertAfter;
@@ -2246,11 +2249,6 @@
    /* FIXME: Initialize the window menu. */
    /* Send a NCCREATE message. */
-   Cs.cx = Size.cx;
-   Cs.cy = Size.cy;
-   Cs.x = Pos.x;
-   Cs.y = Pos.y;
-
    DPRINT("[win32k.window] IntCreateWindowEx style %d, exstyle %d, parent
%d\n", Cs.style, Cs.dwExStyle, Cs.hwndParent);
    DPRINT("IntCreateWindowEx(): (%d,%d-%d,%d)\n", x, y, Size.cx, Size.cy);
    DPRINT("IntCreateWindowEx(): About to send NCCREATE message.\n");