update for HEAD-2003021201
[reactos.git] / subsys / win32k / ntuser / window.c
index 5b8d0fb..e7d7757 100644 (file)
@@ -278,7 +278,7 @@ W32kCreateDesktopWindow(PWINSTATION_OBJECT WindowStation,
   /* Create the window object. */
   WindowObject = (PWINDOW_OBJECT)ObmCreateObject(WindowStation->HandleTable, 
                                                 &Handle, 
-                                                otWindow, 
+                                                otWindow,
                                                 sizeof(WINDOW_OBJECT));
   if (!WindowObject) 
     {
@@ -343,7 +343,7 @@ NtUserCreateWindowEx(DWORD dwExStyle,
   POINT MaxSize, MaxPos, MinTrack, MaxTrack;
   CREATESTRUCTW Cs;
   LRESULT Result;
-  
+
   DPRINT("NtUserCreateWindowEx\n");
 
   /* Initialize gui state if necessary. */
@@ -391,11 +391,11 @@ NtUserCreateWindowEx(DWORD dwExStyle,
     }
 
   /* Create the window object. */
-  WindowObject = (PWINDOW_OBJECT) 
-    ObmCreateObject(PsGetWin32Process()->WindowStation->HandleTable, &Handle, 
+  WindowObject = (PWINDOW_OBJECT)
+    ObmCreateObject(PsGetWin32Process()->WindowStation->HandleTable, &Handle,
                    otWindow, sizeof(WINDOW_OBJECT));
   DPRINT("Created object with handle %X\n", Handle);
-  if (!WindowObject) 
+  if (!WindowObject)
     {
       ObDereferenceObject(WinStaObject);
       ObmDereferenceObject(ClassObject);
@@ -422,18 +422,18 @@ NtUserCreateWindowEx(DWORD dwExStyle,
   WindowObject->Self = Handle;
   WindowObject->MessageQueue = PsGetWin32Thread()->MessageQueue;
   WindowObject->Parent = ParentWindow;
-  InsertHeadList(&ParentWindow->ChildrenListHead, 
+  InsertHeadList(&ParentWindow->ChildrenListHead,
                 &WindowObject->SiblingListEntry);
   InitializeListHead(&WindowObject->ChildrenListHead);
   InitializeListHead(&WindowObject->PropListHead);
 
   RtlInitUnicodeString(&WindowObject->WindowName, WindowName.Buffer);
   RtlFreeUnicodeString(&WindowName);
-  
+
   if (ClassObject->Class.cbWndExtra != 0)
     {
-      WindowObject->ExtraData = 
-       ExAllocatePool(PagedPool, 
+      WindowObject->ExtraData =
+       ExAllocatePool(PagedPool,
                       ClassObject->Class.cbWndExtra * sizeof(DWORD));
       WindowObject->ExtraDataSize = ClassObject->Class.cbWndExtra;
     }
@@ -460,7 +460,7 @@ NtUserCreateWindowEx(DWORD dwExStyle,
                  &WindowObject->ThreadListEntry);
   ExReleaseFastMutexUnsafe (&PsGetWin32Thread()->WindowListLock);
 
-  /* 
+  /*
    * Insert the window into the list of windows associated with the thread's
    * desktop. 
    */
@@ -497,6 +497,12 @@ NtUserCreateWindowEx(DWORD dwExStyle,
 
   /* FIXME: Initialize the window menu. */
 
+  /* Initialize the window's scrollbars */
+  if (dwStyle & WS_VSCROLL)
+      SCROLL_CreateScrollBar(WindowObject, SB_VERT);
+  if (dwStyle & WS_HSCROLL)
+      SCROLL_CreateScrollBar(WindowObject, SB_HORZ);
+
   /* Send a NCCREATE message. */
   Cs.lpCreateParams = lpParam;
   Cs.hInstance = hInstance;