Ask for an MDI child id in all cases.
This commit is contained in:
parent
d515640b6a
commit
2122277284
|
@ -258,6 +258,7 @@ void MDI_CalcDefaultChildPos( HWND hwndClient, INT total, LPPOINT lpPos, INT del
|
|||
MDICLIENTINFO *ci = get_client_info(hwndClient);
|
||||
total = ci ? ci->nTotalCreated : 0;
|
||||
*id = ci->idFirstChild + ci->nActiveChildren;
|
||||
TRACE("MDI child id %04x\n", *id);
|
||||
}
|
||||
|
||||
GetClientRect( hwndClient, &rect );
|
||||
|
@ -1039,7 +1040,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
|
|||
|
||||
if (!hBmpClose) hBmpClose = CreateMDIMenuBitmap();
|
||||
|
||||
TRACE("Client created: hwnd %p, Window menu %p, idFirst = %u\n",
|
||||
TRACE("Client created: hwnd %p, Window menu %p, idFirst = %04x\n",
|
||||
hwnd, ci->hWindowMenu, ci->idFirstChild );
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -800,6 +800,18 @@ BOOL WIN_CreateDesktopWindow(void)
|
|||
*/
|
||||
static void WIN_FixCoordinates( CREATESTRUCTA *cs, INT *sw)
|
||||
{
|
||||
POINT pos[2];
|
||||
|
||||
if (cs->dwExStyle & WS_EX_MDICHILD)
|
||||
{
|
||||
UINT id = 0;
|
||||
|
||||
MDI_CalcDefaultChildPos(cs->hwndParent, -1, pos, 0, &id);
|
||||
if (!(cs->style & WS_POPUP)) cs->hMenu = (HMENU)id;
|
||||
|
||||
TRACE("MDI child id %04x\n", id);
|
||||
}
|
||||
|
||||
if (cs->x == CW_USEDEFAULT || cs->x == CW_USEDEFAULT16 ||
|
||||
cs->cx == CW_USEDEFAULT || cs->cx == CW_USEDEFAULT16)
|
||||
{
|
||||
|
@ -807,12 +819,6 @@ static void WIN_FixCoordinates( CREATESTRUCTA *cs, INT *sw)
|
|||
{
|
||||
if (cs->dwExStyle & WS_EX_MDICHILD)
|
||||
{
|
||||
UINT id = 0;
|
||||
POINT pos[2];
|
||||
|
||||
MDI_CalcDefaultChildPos(cs->hwndParent, -1, pos, 0, &id);
|
||||
if (!(cs->style & WS_POPUP)) cs->hMenu = (HMENU)id;
|
||||
|
||||
if (cs->x == CW_USEDEFAULT || cs->x == CW_USEDEFAULT16)
|
||||
{
|
||||
cs->x = pos[0].x;
|
||||
|
@ -1931,6 +1937,8 @@ static LONG_PTR WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
|
|||
LONG_PTR retvalue = 0;
|
||||
WND *wndPtr;
|
||||
|
||||
TRACE( "%p %d %x\n", hwnd, offset, type );
|
||||
|
||||
if (offset == GWLP_HWNDPARENT)
|
||||
{
|
||||
HWND parent = GetAncestor( hwnd, GA_PARENT );
|
||||
|
|
Loading…
Reference in New Issue