Index: subsystems/win32/win32k/ntuser/window.c =================================================================== --- subsystems/win32/win32k/ntuser/window.c (revision 42982) +++ subsystems/win32/win32k/ntuser/window.c (working copy) @@ -1022,6 +1022,13 @@ // hWnd = Wnd->hSelf; // hWndNewParent = WndNewParent->hSelf; + /* Some applications try to set a child as a parent */ + if (IntIsChildWindow(Wnd, WndNewParent)) + { + SetLastWin32Error( ERROR_INVALID_PARAMETER ); + return 0; + } + /* * Windows hides the window first, then shows it again * including the WM_SHOWWINDOW messages and all