- Fix new msvc compilation issues in win32k due to the fact some files weren't being...
[reactos.git] / reactos / subsys / win32k / ntuser / window.c
index a4f5ee1..6cc107d 100644 (file)
@@ -571,7 +571,7 @@ co_DestroyThreadWindows(struct _ETHREAD *Thread)
    PLIST_ENTRY Current;
    PWINDOW_OBJECT Wnd;
    USER_REFERENCE_ENTRY Ref;
-   WThread = Thread->Tcb.Win32Thread;
+   WThread = (PW32THREAD)Thread->Tcb.Win32Thread;
    
    while (!IsListEmpty(&WThread->WindowListHead))
    {
@@ -1121,7 +1121,7 @@ NtUserBuildHwndList(
          SetLastWin32Error(ERROR_INVALID_PARAMETER);
          return 0;
       }
-      if(!(W32Thread = Thread->Tcb.Win32Thread))
+      if(!(W32Thread = (PW32THREAD)Thread->Tcb.Win32Thread))
       {
          ObDereferenceObject(Thread);
          DPRINT("Thread is not a GUI Thread!\n");
@@ -1462,6 +1462,10 @@ co_IntCreateWindowEx(DWORD dwExStyle,
    Window->IDMenu = 0;
    Window->Instance = hInstance;
    Window->hSelf = hWnd;
+
+   if (!hMenu)
+       hMenu = Class->hMenu;
+
    if (0 != (dwStyle & WS_CHILD))
    {
       Window->IDMenu = (UINT) hMenu;
@@ -1622,7 +1626,7 @@ co_IntCreateWindowEx(DWORD dwExStyle,
       PRTL_USER_PROCESS_PARAMETERS ProcessParams;
       BOOL CalculatedDefPosSize = FALSE;
 
-      IntGetDesktopWorkArea(Window->OwnerThread->Tcb.Win32Thread->Desktop, &WorkArea);
+      IntGetDesktopWorkArea(((PW32THREAD)Window->OwnerThread->Tcb.Win32Thread)->Desktop, &WorkArea);
 
       rc = WorkArea;
       ProcessParams = PsGetCurrentProcess()->Peb->ProcessParameters;
@@ -2936,6 +2940,7 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView)
    PWINDOW_OBJECT WndShell;
    DECLARE_RETURN(BOOL);
    USER_REFERENCE_ENTRY Ref;
+   NTSTATUS Status;
 
    DPRINT("Enter NtUserSetShellWindowEx\n");
    UserEnterExclusive();
@@ -2945,7 +2950,7 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView)
       RETURN(FALSE);
    }
 
-   NTSTATUS Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
+   Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
                      KernelMode,
                      0,
                      &WinStaObject);
@@ -3363,7 +3368,7 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
             /*
              * Remove extended window style bit WS_EX_TOPMOST for shell windows.
              */
-            WindowStation = Window->OwnerThread->Tcb.Win32Thread->Desktop->WindowStation;
+            WindowStation = ((PW32THREAD)Window->OwnerThread->Tcb.Win32Thread)->Desktop->WindowStation;
             if(WindowStation)
             {
                if (hWnd == WindowStation->ShellWindow || hWnd == WindowStation->ShellListView)
@@ -4403,11 +4408,11 @@ DWORD STDCALL
 NtUserDereferenceWndProcHandle(WNDPROC wpHandle, WndProcHandle *Data)
 {
    DECLARE_RETURN(DWORD);
+   WndProcHandle Entry;
 
    DPRINT("Enter NtUserDereferenceWndProcHandle\n");
    UserEnterShared();
 
-   WndProcHandle Entry;
    if (((DWORD)wpHandle & 0xFFFF0000) == 0xFFFF0000)
    {
       Entry = WndProcHandlesArray[(DWORD)wpHandle & 0x0000FFFF];