- Fix mdi class window function Id, now msi message tests do not assert.
svn path=/trunk/; revision=50218
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;
#ifdef __REACTOS__
HeapFree( GetProcessHeap(), 0, ci );
SetWindowLongPtrW( hwnd, 0, 0 );
+ NtUserSetWindowFNID(hwnd, FNID_DESTROY);
#endif
return 0;
}
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;
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;
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: