Author: jimtabor Date: Wed Dec 29 08:17:54 2010 New Revision: 50208
URL: http://svn.reactos.org/svn/reactos?rev=50208&view=rev Log: [User32] - Fix most of the user32 wine win test_mdi tests. Leaving 30 failures dealing with rect size, Class and Title names.
Modified: trunk/reactos/dll/win32/user32/windows/window.c
Modified: trunk/reactos/dll/win32/user32/windows/window.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/wi... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] Wed Dec 29 08:17:54 2010 @@ -342,6 +342,20 @@ POINT mPos[2]; 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 + { + WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", hWndParent); + return NULL; + }
/* lpParams of WM_[NC]CREATE is different for MDI children. * MDICREATESTRUCT members have the originally passed values. @@ -358,7 +372,7 @@
lpParam = (LPVOID)&mdi;
- if (GetWindowLongPtrW(hWndParent, GWL_STYLE) & MDIS_ALLCHILDSTYLES) + if (pWndParent->style & MDIS_ALLCHILDSTYLES) { if (dwStyle & WS_POPUP) { @@ -454,7 +468,21 @@ POINT mPos[2]; 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) + { + WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", hWndParent); + return NULL; + } + /* lpParams of WM_[NC]CREATE is different for MDI children. * MDICREATESTRUCT members have the originally passed values. */ @@ -470,7 +498,7 @@
lpParam = (LPVOID)&mdi;
- if (GetWindowLongPtrW(hWndParent, GWL_STYLE) & MDIS_ALLCHILDSTYLES) + if (pWndParent->style & MDIS_ALLCHILDSTYLES) { if (dwStyle & WS_POPUP) {