Author: jimtabor Date: Wed Aug 12 08:41:20 2009 New Revision: 42629
URL: http://svn.reactos.org/svn/reactos?rev=42629&view=rev Log: Properly set and clear the dialog window flag.
Modified: trunk/reactos/dll/win32/user32/windows/dialog.c trunk/reactos/subsystems/win32/win32k/include/win32.h trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
Modified: trunk/reactos/dll/win32/user32/windows/dialog.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/di... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] Wed Aug 12 08:41:20 2009 @@ -160,7 +160,7 @@
SETDLGINFO( hWnd, dlgInfo );
- NtUserSetWindowFNID( hWnd, FNID_DIALOG ); + NtUserCallHwndParam( hWnd, (DWORD)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER ); } else { @@ -1088,6 +1088,7 @@ if (dlgInfo->hUserFont) DeleteObject( dlgInfo->hUserFont ); if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu ); HeapFree( GetProcessHeap(), 0, dlgInfo ); + NtUserCallHwndParam( hwnd, 0, HWNDPARAM_ROUTINE_SETDIALOGPOINTER ); } /* Window clean-up */ return DefWindowProcA( hwnd, msg, wParam, lParam );
Modified: trunk/reactos/subsystems/win32/win32k/include/win32.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] Wed Aug 12 08:41:20 2009 @@ -36,7 +36,7 @@ { W32THREAD; PTL ptl; - PVOID ppi; // FIXME: use PPROCESSINFO + PPROCESSINFO ppi; struct _USER_MESSAGE_QUEUE* MessageQueue; struct _KBL* KeyboardLayout; PCLIENTTHREADINFO pcti;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Wed Aug 12 08:41:20 2009 @@ -802,6 +802,42 @@ { case HWNDPARAM_ROUTINE_KILLSYSTEMTIMER: return IntKillTimer(hWnd, (UINT_PTR)Param, TRUE); + + case HWNDPARAM_ROUTINE_SETDIALOGPOINTER: + { + PWINDOW_OBJECT Window; + PWND pWnd; + USER_REFERENCE_ENTRY Ref; + + UserEnterExclusive(); + + if (!(Window = UserGetWindowObject(hWnd)) || !Window->Wnd) + { + UserLeave(); + return 0; + } + UserRefObjectCo(Window, &Ref); + + pWnd = Window->Wnd; + if (pWnd->head.pti->ppi == PsGetCurrentProcessWin32Process() && + pWnd->cbwndExtra == DLGWINDOWEXTRA) + { + if (Param) + { + if (!pWnd->fnid) pWnd->fnid = FNID_DIALOG; + pWnd->state |= WNDS_DIALOGWINDOW; + } + else + { + pWnd->fnid |= FNID_DESTROY; + pWnd->state &= ~WNDS_DIALOGWINDOW; + } + } + + UserDerefObjectCo(Window); + UserLeave(); + return 0; + } }
UNIMPLEMENTED;