From 1cc0a9a2c46ce01fb8178f9354bfb0b24d52a2f9 Mon Sep 17 00:00:00 2001 From: Francis Beaudet Date: Fri, 3 Sep 1999 15:00:45 +0000 Subject: [PATCH] Make sure that all MDI children have the WS_EX_MDICHILD style set. --- windows/mdi.c | 3 +++ windows/nonclient.c | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/windows/mdi.c b/windows/mdi.c index e3674e8a421..3547b44f6e6 100644 --- a/windows/mdi.c +++ b/windows/mdi.c @@ -372,6 +372,9 @@ static HWND MDICreateChild( WND *w, MDICLIENTINFO *ci, HWND parent, { WND* wnd = WIN_FindWndPtr( hwnd ); + /* All MDI child windows have the WS_EX_MDICHILD style */ + wnd->dwExStyle |= WS_EX_MDICHILD; + MDI_MenuModifyItem(w ,hwnd); if( wnd->dwStyle & WS_MINIMIZE && ci->hwndActiveChild ) ShowWindow( hwnd, SW_SHOWMINNOACTIVE ); diff --git a/windows/nonclient.c b/windows/nonclient.c index 60428f66a05..327b4e6c707 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c @@ -636,7 +636,11 @@ NC_GetInsideRect95 (HWND hwnd, RECT *rect) InflateRect( rect, -GetSystemMetrics(SM_CXBORDER), -GetSystemMetrics(SM_CYBORDER) ); } - if (wndPtr->dwStyle & WS_CHILD) { + /* We have additional border information if the window + * is a child (but not an MDI child) */ + if ( (wndPtr->dwStyle & WS_CHILD) && + ( (wndPtr->dwExStyle & WS_EX_MDICHILD) == 0 ) ) + { if (wndPtr->dwExStyle & WS_EX_CLIENTEDGE) InflateRect (rect, -GetSystemMetrics(SM_CXEDGE), -GetSystemMetrics(SM_CYEDGE));