/* Create the window object. */
WindowObject = (PWINDOW_OBJECT)ObmCreateObject(WindowStation->HandleTable,
&Handle,
- otWindow,
+ otWindow,
sizeof(WINDOW_OBJECT));
if (!WindowObject)
{
POINT MaxSize, MaxPos, MinTrack, MaxTrack;
CREATESTRUCTW Cs;
LRESULT Result;
-
+
DPRINT("NtUserCreateWindowEx\n");
/* Initialize gui state if necessary. */
}
/* 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);
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;
}
&WindowObject->ThreadListEntry);
ExReleaseFastMutexUnsafe (&PsGetWin32Thread()->WindowListLock);
- /*
+ /*
* Insert the window into the list of windows associated with the thread's
* desktop.
*/
/* 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;