mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 22:00:55 +00:00
Properly set and clear the dialog window flag.
svn path=/trunk/; revision=42629
This commit is contained in:
parent
fbe691dd9b
commit
0fa041c7b4
3 changed files with 39 additions and 2 deletions
|
@ -160,7 +160,7 @@ DIALOGINFO * DIALOG_get_info( HWND hWnd, BOOL create )
|
|||
|
||||
SETDLGINFO( hWnd, dlgInfo );
|
||||
|
||||
NtUserSetWindowFNID( hWnd, FNID_DIALOG );
|
||||
NtUserCallHwndParam( hWnd, (DWORD)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1088,6 +1088,7 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
|
|||
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 );
|
||||
|
|
|
@ -36,7 +36,7 @@ typedef struct _THREADINFO
|
|||
{
|
||||
W32THREAD;
|
||||
PTL ptl;
|
||||
PVOID ppi; // FIXME: use PPROCESSINFO
|
||||
PPROCESSINFO ppi;
|
||||
struct _USER_MESSAGE_QUEUE* MessageQueue;
|
||||
struct _KBL* KeyboardLayout;
|
||||
PCLIENTTHREADINFO pcti;
|
||||
|
|
|
@ -802,6 +802,42 @@ NtUserCallHwndParam(
|
|||
{
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue