3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
6 * FILE: subsys/win32k/ntuser/window.c
7 * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
9 * 06-06-2001 CSH Created
11 /* INCLUDES ******************************************************************/
13 #include <ddk/ntddk.h>
14 #include <internal/safe.h>
15 #include <win32k/win32k.h>
16 #include <include/object.h>
17 #include <include/guicheck.h>
18 #include <include/window.h>
19 #include <include/class.h>
20 #include <include/error.h>
21 #include <include/winsta.h>
22 #include <include/winpos.h>
23 #include <include/callback.h>
24 #include <include/msgqueue.h>
25 #include <include/rect.h>
28 #include <win32k/debug1.h>
31 #define TAG_WNAM TAG('W', 'N', 'A', 'M')
33 /* FUNCTIONS *****************************************************************/
36 NtUserGetAncestor(HWND hWnd, UINT Flags)
38 if (W32kIsDesktopWindow(hWnd))
42 if (Flags & GA_PARENT)
44 PWINDOW_OBJECT Window;
47 Window = W32kGetWindowObject(hWnd);
53 if (Window->Parent == NULL)
55 W32kReleaseWindowObject(Window);
58 hParent = Window->Parent->Self;
60 W32kReleaseWindowObject(Window);
72 W32kSetFocusWindow(HWND hWnd)
77 W32kIsChildWindow(HWND Parent, HWND Child)
79 PWINDOW_OBJECT BaseWindow = W32kGetWindowObject(Child);
80 PWINDOW_OBJECT Window = BaseWindow;
81 while (Window != NULL && Window->Style & WS_CHILD)
83 if (Window->Self == Parent)
85 W32kReleaseWindowObject(BaseWindow);
88 Window = Window->Parent;
90 W32kReleaseWindowObject(BaseWindow);
95 W32kIsWindowVisible(HWND Wnd)
97 PWINDOW_OBJECT BaseWindow = W32kGetWindowObject(Wnd);
98 PWINDOW_OBJECT Window = BaseWindow;
99 BOOLEAN Result = FALSE;
100 while (Window != NULL && Window->Style & WS_CHILD)
102 if (!(Window->Style & WS_VISIBLE))
104 W32kReleaseWindowObject(BaseWindow);
107 Window = Window->Parent;
109 if (Window != NULL && Window->Style & WS_VISIBLE)
113 W32kReleaseWindowObject(BaseWindow);
118 W32kIsDesktopWindow(HWND hWnd)
120 PWINDOW_OBJECT WindowObject;
122 WindowObject = W32kGetWindowObject(hWnd);
123 IsDesktop = WindowObject->Parent == NULL;
124 W32kReleaseWindowObject(WindowObject);
128 HWND W32kGetDesktopWindow()
130 return W32kGetActiveDesktop()->DesktopWindow;
133 HWND W32kGetParentWindow(HWND hWnd)
135 return W32kGetWindowObject(hWnd)->ParentHandle;
139 W32kGetWindowObject(HWND hWnd)
141 PWINDOW_OBJECT WindowObject;
144 ObmReferenceObjectByHandle(PsGetWin32Process()->WindowStation->
148 (PVOID*)&WindowObject);
149 if (!NT_SUCCESS(Status))
153 return(WindowObject);
157 W32kReleaseWindowObject(PWINDOW_OBJECT Window)
159 ObmDereferenceObject(Window);
164 * Returns client window rectangle relative to the upper-left corner of client area.
166 * \note Does not check the validity of the parameters
169 W32kGetClientRect(PWINDOW_OBJECT WindowObject, PRECT Rect)
171 ASSERT( WindowObject );
174 Rect->left = Rect->top = 0;
175 Rect->right = WindowObject->ClientRect.right - WindowObject->ClientRect.left;
177 WindowObject->ClientRect.bottom - WindowObject->ClientRect.top;
182 * Return the dimension of the window in the screen coordinates.
185 W32kGetWindowRect(HWND hWnd, LPRECT Rect)
187 PWINDOW_OBJECT WindowObject;
191 WindowObject = W32kGetWindowObject(hWnd);
192 if (WindowObject == NULL)
196 *Rect = WindowObject->WindowRect;
197 if (WindowObject->Style & WS_CHILD)
201 W32kReleaseWindowObject(WindowObject);
206 * Return the dimension of the window in the screen coordinates.
207 * \param hWnd window handle.
208 * \param Rect pointer to the buffer where the coordinates are returned.
211 NtUserGetWindowRect(HWND hWnd, LPRECT Rect)
216 bRet = W32kGetWindowRect(hWnd, &SafeRect);
217 if (! NT_SUCCESS(MmCopyToCaller(Rect, &SafeRect, sizeof(RECT)))){
224 * Returns client window rectangle relative to the upper-left corner of client area.
226 * \param hWnd window handle.
227 * \param Rect pointer to the buffer where the coordinates are returned.
231 NtUserGetClientRect(HWND hWnd, LPRECT Rect)
233 PWINDOW_OBJECT WindowObject;
236 WindowObject = W32kGetWindowObject(hWnd);
237 if (WindowObject == NULL)
241 W32kGetClientRect(WindowObject, &SafeRect);
242 if (! NT_SUCCESS(MmCopyToCaller(Rect, &SafeRect, sizeof(RECT))))
247 W32kReleaseWindowObject(WindowObject);
252 W32kGetActiveWindow(VOID)
254 PUSER_MESSAGE_QUEUE Queue;
255 Queue = (PUSER_MESSAGE_QUEUE)W32kGetActiveDesktop()->ActiveMessageQueue;
262 return(Queue->ActiveWindow);
267 W32kGetFocusWindow(VOID)
269 PUSER_MESSAGE_QUEUE Queue;
270 PDESKTOP_OBJECT pdo = W32kGetActiveDesktop();
275 Queue = (PUSER_MESSAGE_QUEUE)pdo->ActiveMessageQueue;
280 return(Queue->FocusWindow);
285 W32kGetWindowProc(HWND Wnd)
287 PWINDOW_OBJECT WindowObject;
290 WindowObject = W32kGetWindowObject(Wnd);
294 WndProc = WindowObject->Class->Class.lpfnWndProc;
295 W32kReleaseWindowObject(Wnd);
302 return(STATUS_SUCCESS);
306 CleanupWindowImpl(VOID)
308 return(STATUS_SUCCESS);
313 NtUserAlterWindowStyle(DWORD Unknown0,
323 NtUserChildWindowFromPointEx(HWND Parent,
334 W32kCreateDesktopWindow(PWINSTATION_OBJECT WindowStation,
335 PWNDCLASS_OBJECT DesktopClass,
336 ULONG Width, ULONG Height)
340 PWINDOW_OBJECT WindowObject;
342 /* Create the window object. */
343 WindowObject = (PWINDOW_OBJECT)ObmCreateObject(WindowStation->HandleTable,
346 sizeof(WINDOW_OBJECT));
353 * Fill out the structure describing it.
355 WindowObject->Class = DesktopClass;
356 WindowObject->ExStyle = 0;
357 WindowObject->Style = WS_VISIBLE;
360 WindowObject->Width = Width;
361 WindowObject->Height = Height;
362 WindowObject->ParentHandle = NULL;
363 WindowObject->Parent = NULL;
364 WindowObject->Menu = NULL;
365 WindowObject->Instance = NULL;
366 WindowObject->Parameters = NULL;
367 WindowObject->Self = Handle;
368 WindowObject->MessageQueue = NULL;
369 WindowObject->ExtraData = NULL;
370 WindowObject->ExtraDataSize = 0;
371 WindowObject->WindowRect.left = 0;
372 WindowObject->WindowRect.top = 0;
373 WindowObject->WindowRect.right = Width;
374 WindowObject->WindowRect.bottom = Height;
375 WindowObject->ClientRect = WindowObject->WindowRect;
376 InitializeListHead(&WindowObject->ChildrenListHead);
378 WindowName = ExAllocatePool(NonPagedPool, sizeof(L"DESKTOP"));
379 wcscpy(WindowName, L"DESKTOP");
380 RtlInitUnicodeString(&WindowObject->WindowName, WindowName);
386 NtUserCreateWindowEx(DWORD dwExStyle,
387 PUNICODE_STRING lpClassName,
388 PUNICODE_STRING lpWindowName,
400 PWINSTATION_OBJECT WinStaObject;
401 PWNDCLASS_OBJECT ClassObject;
402 PWINDOW_OBJECT WindowObject;
403 PWINDOW_OBJECT ParentWindow;
404 UNICODE_STRING WindowName;
407 POINT MaxSize, MaxPos, MinTrack, MaxTrack;
410 DPRINT("NtUserCreateWindowEx\n");
412 /* Initialize gui state if necessary. */
414 W32kGraphicsCheck(TRUE);
416 if (!RtlCreateUnicodeString(&WindowName, lpWindowName->Buffer))
418 SetLastNtError(STATUS_INSUFFICIENT_RESOURCES);
422 if (hWndParent != NULL)
424 ParentWindow = W32kGetWindowObject(hWndParent);
428 hWndParent = PsGetWin32Thread()->Desktop->DesktopWindow;
429 ParentWindow = W32kGetWindowObject(hWndParent);
432 /* Check the class. */
433 Status = ClassReferenceClassByNameOrAtom(&ClassObject, lpClassName->Buffer);
434 if (!NT_SUCCESS(Status))
436 RtlFreeUnicodeString(&WindowName);
440 /* Check the window station. */
441 DPRINT("IoGetCurrentProcess() %X\n", IoGetCurrentProcess());
442 DPRINT("PROCESS_WINDOW_STATION %X\n", PROCESS_WINDOW_STATION());
443 Status = ValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
447 if (!NT_SUCCESS(Status))
449 RtlFreeUnicodeString(&WindowName);
450 ObmDereferenceObject(ClassObject);
451 DPRINT("Validation of window station handle (0x%X) failed\n",
452 PROCESS_WINDOW_STATION());
456 /* Create the window object. */
457 WindowObject = (PWINDOW_OBJECT)
458 ObmCreateObject(PsGetWin32Process()->WindowStation->HandleTable, &Handle,
459 otWindow, sizeof(WINDOW_OBJECT));
460 DPRINT("Created object with handle %X\n", Handle);
463 ObDereferenceObject(WinStaObject);
464 ObmDereferenceObject(ClassObject);
465 RtlFreeUnicodeString(&WindowName);
466 SetLastNtError(STATUS_INSUFFICIENT_RESOURCES);
469 ObDereferenceObject(WinStaObject);
472 * Fill out the structure describing it.
474 WindowObject->Class = ClassObject;
475 WindowObject->ExStyle = dwExStyle;
476 WindowObject->Style = dwStyle | WIN_NCACTIVATED;
479 WindowObject->Width = nWidth;
480 WindowObject->Height = nHeight;
481 WindowObject->ParentHandle = hWndParent;
482 WindowObject->Menu = hMenu;
483 WindowObject->Instance = hInstance;
484 WindowObject->Parameters = lpParam;
485 WindowObject->Self = Handle;
486 WindowObject->MessageQueue = PsGetWin32Thread()->MessageQueue;
487 WindowObject->Parent = ParentWindow;
488 InsertHeadList(&ParentWindow->ChildrenListHead,
489 &WindowObject->SiblingListEntry);
490 InitializeListHead(&WindowObject->ChildrenListHead);
491 InitializeListHead(&WindowObject->PropListHead);
492 ExInitializeFastMutex(&WindowObject->ChildrenListLock);
494 RtlInitUnicodeString(&WindowObject->WindowName, WindowName.Buffer);
495 RtlFreeUnicodeString(&WindowName);
497 if (ClassObject->Class.cbWndExtra != 0)
499 WindowObject->ExtraData =
500 ExAllocatePool(PagedPool,
501 ClassObject->Class.cbWndExtra * sizeof(DWORD));
502 WindowObject->ExtraDataSize = ClassObject->Class.cbWndExtra;
506 WindowObject->ExtraData = NULL;
507 WindowObject->ExtraDataSize = 0;
510 /* Correct the window style. */
511 if (!(dwStyle & WS_CHILD))
513 WindowObject->Style |= WS_CLIPSIBLINGS;
514 if (!(dwStyle & WS_POPUP))
516 WindowObject->Style |= WS_CAPTION;
517 /* FIXME: Note the window needs a size. */
521 /* Insert the window into the process's window list. */
522 ExAcquireFastMutexUnsafe (&PsGetWin32Thread()->WindowListLock);
523 InsertTailList (&PsGetWin32Thread()->WindowListHead,
524 &WindowObject->ThreadListEntry);
525 ExReleaseFastMutexUnsafe (&PsGetWin32Thread()->WindowListLock);
528 * Insert the window into the list of windows associated with the thread's
531 InsertTailList(&PsGetWin32Thread()->Desktop->WindowListHead,
532 &WindowObject->DesktopListEntry);
533 /* Allocate a DCE for this window. */
534 if (dwStyle & CS_OWNDC) WindowObject->Dce = DceAllocDCE(WindowObject->Self,DCE_WINDOW_DC);
535 /* FIXME: Handle "CS_CLASSDC" */
537 /* Initialize the window dimensions. */
538 WindowObject->WindowRect.left = x;
539 WindowObject->WindowRect.top = y;
540 WindowObject->WindowRect.right = x + nWidth;
541 WindowObject->WindowRect.bottom = y + nHeight;
542 WindowObject->ClientRect = WindowObject->WindowRect;
545 * Get the size and position of the window.
547 if ((dwStyle & WS_THICKFRAME) || !(dwStyle & (WS_POPUP | WS_CHILD)))
549 WinPosGetMinMaxInfo(WindowObject, &MaxSize, &MaxPos, &MinTrack,
551 x = min(MaxSize.x, y);
552 y = min(MaxSize.y, y);
553 x = max(MinTrack.x, x);
554 y = max(MinTrack.y, y);
557 WindowObject->WindowRect.left = x;
558 WindowObject->WindowRect.top = y;
559 WindowObject->WindowRect.right = x + nWidth;
560 WindowObject->WindowRect.bottom = y + nHeight;
561 WindowObject->ClientRect = WindowObject->WindowRect;
563 /* FIXME: Initialize the window menu. */
565 /* Initialize the window's scrollbars */
566 if (dwStyle & WS_VSCROLL)
567 SCROLL_CreateScrollBar(WindowObject, SB_VERT);
568 if (dwStyle & WS_HSCROLL)
569 SCROLL_CreateScrollBar(WindowObject, SB_HORZ);
571 /* Send a NCCREATE message. */
572 Cs.lpCreateParams = lpParam;
573 Cs.hInstance = hInstance;
575 Cs.hwndParent = hWndParent;
581 Cs.lpszName = lpWindowName->Buffer;
582 Cs.lpszClass = lpClassName->Buffer;
583 Cs.dwExStyle = dwExStyle;
584 DPRINT("NtUserCreateWindowEx(): About to send NCCREATE message.\n");
585 Result = W32kSendNCCREATEMessage(WindowObject->Self, &Cs);
588 /* FIXME: Cleanup. */
589 DPRINT("NtUserCreateWindowEx(): NCCREATE message failed.\n");
593 /* Calculate the non-client size. */
594 MaxPos.x = WindowObject->WindowRect.left;
595 MaxPos.y = WindowObject->WindowRect.top;
596 DPRINT("NtUserCreateWindowEx(): About to get non-client size.\n");
597 Result = WinPosGetNonClientSize(WindowObject->Self,
598 &WindowObject->WindowRect,
599 &WindowObject->ClientRect);
600 W32kOffsetRect(&WindowObject->WindowRect,
601 MaxPos.x - WindowObject->WindowRect.left,
602 MaxPos.y - WindowObject->WindowRect.top);
604 /* Send the CREATE message. */
605 DPRINT("NtUserCreateWindowEx(): about to send CREATE message.\n");
606 Result = W32kSendCREATEMessage(WindowObject->Self, &Cs);
607 if (Result == (LRESULT)-1)
609 /* FIXME: Cleanup. */
610 DPRINT("NtUserCreateWindowEx(): send CREATE message failed.\n");
614 /* Send move and size messages. */
615 if (!(WindowObject->Flags & WINDOWOBJECT_NEED_SIZE))
620 MAKE_LONG(WindowObject->ClientRect.right -
621 WindowObject->ClientRect.left,
622 WindowObject->ClientRect.bottom -
623 WindowObject->ClientRect.top);
625 DPRINT("NtUserCreateWindow(): About to send WM_SIZE\n");
626 W32kCallWindowProc(NULL, WindowObject->Self, WM_SIZE, SIZE_RESTORED,
629 MAKE_LONG(WindowObject->ClientRect.left,
630 WindowObject->ClientRect.top);
631 DPRINT("NtUserCreateWindow(): About to send WM_MOVE\n");
632 W32kCallWindowProc(NULL, WindowObject->Self, WM_MOVE, 0, lParam);
635 /* Show or maybe minimize or maximize the window. */
636 if (WindowObject->Style & (WS_MINIMIZE | WS_MAXIMIZE))
641 SwFlag = (WindowObject->Style & WS_MINIMIZE) ? SW_MINIMIZE :
643 WinPosMinMaximize(WindowObject, SwFlag, &NewPos);
645 ((WindowObject->Style & WS_CHILD) || W32kGetActiveWindow()) ?
646 SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED :
647 SWP_NOZORDER | SWP_FRAMECHANGED;
648 DPRINT("NtUserCreateWindow(): About to minimize/maximize\n");
649 WinPosSetWindowPos(WindowObject->Self, 0, NewPos.left, NewPos.top,
650 NewPos.right, NewPos.bottom, SwFlag);
653 /* Notify the parent window of a new child. */
654 if ((WindowObject->Style & WS_CHILD) ||
655 (!(WindowObject->ExStyle & WS_EX_NOPARENTNOTIFY)))
657 DPRINT("NtUserCreateWindow(): About to notify parent\n");
658 W32kCallWindowProc(NULL, WindowObject->Parent->Self,
660 MAKEWPARAM(WM_CREATE, WindowObject->IDMenu),
661 (LPARAM)WindowObject->Self);
664 if (dwStyle & WS_VISIBLE)
666 DPRINT("NtUserCreateWindow(): About to show window\n");
667 WinPosShowWindow(WindowObject->Self, dwShowMode);
670 DPRINT("NtUserCreateWindow(): = %X\n", Handle);
671 return((HWND)Handle);
675 NtUserDeferWindowPos(HDWP WinPosInfo,
690 NtUserDestroyWindow(HWND Wnd)
692 W32kGraphicsCheck(FALSE);
698 NtUserEndDeferWindowPosEx(DWORD Unknown0,
707 NtUserFillWindow(DWORD Unknown0,
718 NtUserFindWindowEx(HWND hwndParent,
720 PUNICODE_STRING ucClassName,
721 PUNICODE_STRING ucWindowName,
727 PWINDOW_OBJECT windowObject;
728 PLIST_ENTRY currentEntry;
729 PWNDCLASS_OBJECT classObject;
733 status = ClassReferenceClassByNameOrAtom(&classObject, ucClassName->Buffer);
734 if (!NT_SUCCESS(status))
739 ExAcquireFastMutexUnsafe (&PsGetWin32Process()->WindowListLock);
740 currentEntry = PsGetWin32Process()->WindowListHead.Flink;
741 while (currentEntry != &PsGetWin32Process()->WindowListHead)
743 windowObject = CONTAINING_RECORD (currentEntry, WINDOW_OBJECT,
746 if (classObject == windowObject->Class &&
747 RtlCompareUnicodeString (ucWindowName, &windowObject->WindowName,
750 ObmCreateHandle(PsGetWin32Process()->HandleTable,
753 ExReleaseFastMutexUnsafe (&PsGetWin32Process()->WindowListLock);
754 ObmDereferenceObject (classObject);
758 currentEntry = currentEntry->Flink;
760 ExReleaseFastMutexUnsafe (&PsGetWin32Process()->WindowListLock);
762 ObmDereferenceObject (classObject);
769 NtUserFlashWindowEx(DWORD Unknown0)
777 NtUserGetForegroundWindow(VOID)
785 NtUserGetInternalWindowPos(DWORD Unknown0,
795 NtUserGetOpenClipboardWindow(VOID)
803 NtUserGetWindowDC(HWND hWnd)
805 return NtUserGetDCEx( hWnd, 0, DCX_USESTYLE | DCX_WINDOW );
809 NtUserGetWindowPlacement(DWORD Unknown0,
818 NtUserInternalGetWindowText(DWORD Unknown0,
828 NtUserLockWindowUpdate(DWORD Unknown0)
844 PWINDOW_OBJECT Window = W32kGetWindowObject(hWnd);
845 ULONG uStyle, uExStyle;
848 if (!Window) return FALSE;
850 uStyle = Window->Style;
851 uExStyle = Window->ExStyle;
856 if (nWidth > NtUserGetSystemMetrics(SM_CXMIN))
857 pWinPos.cx = pWinPos.x + nWidth;
859 pWinPos.cx = pWinPos.x + NtUserGetSystemMetrics(SM_CXMIN);
861 if (nHeight > NtUserGetSystemMetrics(SM_CYMIN))
862 pWinPos.cy = pWinPos.x + nHeight;
864 pWinPos.cy = pWinPos.y + NtUserGetSystemMetrics(SM_CYMIN);
865 NtUserSendMessage(hWnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)&pWinPos);
867 Window->WindowRect.top = Window->ClientRect.top = pWinPos.y;
868 Window->WindowRect.left = Window->ClientRect.left = pWinPos.x;
869 Window->WindowRect.bottom = Window->ClientRect.bottom = pWinPos.cy;
870 Window->WindowRect.right = Window->ClientRect.right = pWinPos.cx;
872 if (!(uStyle & WS_THICKFRAME))
874 Window->ClientRect.top += NtUserGetSystemMetrics(SM_CYFIXEDFRAME);
875 Window->ClientRect.bottom -= NtUserGetSystemMetrics(SM_CYFIXEDFRAME);
876 Window->ClientRect.left += NtUserGetSystemMetrics(SM_CXFIXEDFRAME);
877 Window->ClientRect.right -= NtUserGetSystemMetrics(SM_CXFIXEDFRAME);
881 Window->ClientRect.top += NtUserGetSystemMetrics(SM_CYSIZEFRAME);
882 Window->ClientRect.bottom -= NtUserGetSystemMetrics(SM_CYSIZEFRAME);
883 Window->ClientRect.left += NtUserGetSystemMetrics(SM_CXSIZEFRAME);
884 Window->ClientRect.right -= NtUserGetSystemMetrics(SM_CXSIZEFRAME);
887 if (uStyle & WS_CAPTION)
888 Window->ClientRect.top += NtUserGetSystemMetrics(SM_CYCAPTION);
889 if ( Window->Class->Class.lpszMenuName)
891 Window->ClientRect.top += NtUserGetSystemMetrics(SM_CYMENU);
894 NtUserSendMessage(hWnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)&pWinPos);
896 NtUserSendMessage(hWnd, WM_MOVE, 0, MAKEWORD(Window->ClientRect.left,
897 Window->ClientRect.top));
899 NtUserSendMessage(hWnd, WM_SIZE, 0, MAKEWORD(Window->ClientRect.right -
900 Window->ClientRect.left,
901 Window->ClientRect.bottom -
902 Window->ClientRect.top));
904 /* FIXME: Send WM_NCCALCSIZE */
905 W32kReleaseWindowObject(Window);
906 if (bRepaint) NtUserSendMessage(hWnd, WM_PAINT, 0, 0);
911 NtUserQueryWindow(DWORD Unknown0,
920 NtUserRealChildWindowFromPoint(DWORD Unknown0,
930 NtUserRedrawWindow(HWND hWnd, CONST RECT *lprcUpdate, HRGN hrgnUpdate, UINT flags)
935 if (NULL != lprcUpdate)
937 Status = MmCopyFromCaller(&SafeUpdateRect, lprcUpdate, sizeof(RECT));
938 if (! NT_SUCCESS(Status))
944 return PaintRedrawWindow(hWnd, NULL == lprcUpdate ? NULL : &SafeUpdateRect, hrgnUpdate,
945 flags, 0) ? STATUS_SUCCESS : STATUS_INVALID_PARAMETER;
950 NtUserRegisterWindowMessage(LPCWSTR MessageName)
958 NtUserScrollWindowEx(DWORD Unknown0,
973 NtUserSetActiveWindow(DWORD Unknown0)
981 NtUserSetImeOwnerWindow(DWORD Unknown0,
990 NtUserSetInternalWindowPos(DWORD Unknown0,
1002 NtUserSetLayeredWindowAttributes(DWORD Unknown0,
1013 NtUserSetLogonNotifyWindow(DWORD Unknown0)
1021 NtUserSetShellWindowEx(DWORD Unknown0,
1030 NtUserSetWindowFNID(DWORD Unknown0,
1039 NtUserGetWindowLong(HWND hWnd, DWORD Index)
1041 PWINDOW_OBJECT WindowObject;
1048 ObmReferenceObjectByHandle(PsGetWin32Process()->WindowStation->HandleTable,
1051 (PVOID*)&WindowObject);
1052 if (!NT_SUCCESS(Status))
1061 Result = (DWORD)WindowObject->ExStyle;
1067 Result = (DWORD)WindowObject->Style;
1073 Result = (DWORD)WindowObject->Class->Class.lpfnWndProc;
1081 DPRINT1("NtUserGetWindowLong(): Unsupported index %d\n", Index);
1087 ObmDereferenceObject(WindowObject);
1092 NtUserSetWindowLong(DWORD Unknown0,
1103 NtUserSetWindowPlacement(DWORD Unknown0,
1112 STDCALL NtUserSetWindowPos(
1114 HWND hWndInsertAfter,
1121 return WinPosSetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags);
1125 NtUserSetWindowRgn(DWORD Unknown0,
1135 NtUserSetWindowWord(DWORD Unknown0,
1145 NtUserShowWindow(HWND hWnd,
1150 return(WinPosShowWindow(hWnd, nCmdShow));
1154 NtUserShowWindowAsync(DWORD Unknown0,
1162 BOOL STDCALL NtUserUpdateWindow( HWND hWnd )
1164 PWINDOW_OBJECT pWindow = W32kGetWindowObject( hWnd);
1168 if (pWindow->UpdateRegion)
1169 NtUserSendMessage( hWnd, WM_PAINT,0,0);
1170 W32kReleaseWindowObject(pWindow);
1175 NtUserUpdateLayeredWindow(DWORD Unknown0,
1191 NtUserWindowFromPoint(DWORD Unknown0,