Reparenting a window with SetParent in Windows should cause the child

window being re-parented to be moved up to the topmost in the z-order,
and WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages to be sent.
This commit is contained in:
Noel Borthwick 1999-01-20 13:50:13 +00:00 committed by Alexandre Julliard
parent fc43f81f3f
commit 463eb29419
1 changed files with 6 additions and 0 deletions

View File

@ -1908,6 +1908,12 @@ HWND32 WINAPI SetParent32( HWND32 hwndChild, HWND32 hwndNewParent )
WND *pWndOldParent =
(wndPtr)?(*wndPtr->pDriver->pSetParent)(wndPtr, pWndNewParent):NULL;
/* SetParent32 additionally needs to make hwndChild the topmost window
in the x-order and send the expected WM_WINDOWPOSCHANGING and
WM_WINDOWPOSCHANGED notification messages.
*/
SetWindowPos32( hwndChild, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
return pWndOldParent?pWndOldParent->hwndSelf:0;
}