[Win32k|User32]

- Fix mdi class window function Id, now msi message tests do not assert.


svn path=/trunk/; revision=50218
This commit is contained in:
James Tabor 2010-12-30 00:59:10 +00:00
parent a1d29e9435
commit c2a558dbb7
3 changed files with 17 additions and 13 deletions

View file

@ -1111,6 +1111,7 @@ LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam,
return FALSE;
SetWindowLongPtrW( hwnd, 0, (LONG_PTR)ci );
ci->hBmpClose = 0;
NtUserSetWindowFNID( hwnd, FNID_MDICLIENT); // wine uses WIN_ISMDICLIENT
#else
WND *wndPtr = WIN_GetPtr( hwnd );
wndPtr->flags |= WIN_ISMDICLIENT;
@ -1160,6 +1161,7 @@ LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam,
#ifdef __REACTOS__
HeapFree( GetProcessHeap(), 0, ci );
SetWindowLongPtrW( hwnd, 0, 0 );
NtUserSetWindowFNID(hwnd, FNID_DESTROY);
#endif
return 0;
}

View file

@ -343,15 +343,12 @@ CreateWindowExA(DWORD dwExStyle,
UINT id = 0;
HWND top_child;
PWND pWndParent;
PCLS pCls;
pWndParent = ValidateHwnd(hWndParent);
if (!pWndParent) return NULL;
pCls = DesktopPtrToUser(pWndParent->pcls);
if (pCls->fnid != FNID_MDICLIENT) // wine uses WIN_ISMDICLIENT
if (pWndParent->fnid != FNID_MDICLIENT) // wine uses WIN_ISMDICLIENT
{
WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", hWndParent);
return NULL;
@ -469,15 +466,12 @@ CreateWindowExW(DWORD dwExStyle,
UINT id = 0;
HWND top_child;
PWND pWndParent;
PCLS pCls;
pWndParent = ValidateHwnd(hWndParent);
if (!pWndParent) return NULL;
pCls = DesktopPtrToUser(pWndParent->pcls);
if (pCls->fnid != FNID_MDICLIENT)
if (pWndParent->fnid != FNID_MDICLIENT)
{
WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", hWndParent);
return NULL;

View file

@ -3878,15 +3878,23 @@ NtUserSetWindowFNID(HWND hWnd,
RETURN( FALSE);
}
if (Wnd->pcls)
{ // From user land we only set these.
if ((fnID != FNID_DESTROY) || ((fnID < FNID_BUTTON) && (fnID > FNID_IME)) )
if (Wnd->head.pti->ppi != PsGetCurrentProcessWin32Process())
{
EngSetLastError(ERROR_ACCESS_DENIED);
RETURN( FALSE);
}
// From user land we only set these.
if (fnID != FNID_DESTROY)
{
if ( ((fnID < FNID_BUTTON) && (fnID > FNID_IME)) ||
Wnd->fnid != 0 )
{
RETURN( FALSE);
}
else
Wnd->pcls->fnid |= fnID;
}
Wnd->fnid |= fnID;
RETURN( TRUE);
CLEANUP: