+// Change the client window's extended style so we don't get a client edge
+// style when a child is maximised (a double border looks silly.)
+bool wxMDIChildFrame::ResetWindowStyle(void *vrect)
+{
+#if defined(__WIN95__)
+ RECT *rect = (RECT *)vrect;
+ wxMDIParentFrame* pFrameWnd = (wxMDIParentFrame *)GetParent();
+ wxMDIChildFrame* pChild = pFrameWnd->GetActiveChild();
+ if (!pChild || (pChild == this))
+ {
+ DWORD dwStyle = ::GetWindowLong(GetWinHwnd(pFrameWnd->GetClientWindow()), GWL_EXSTYLE);
+ DWORD dwThisStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE);
+ DWORD dwNewStyle = dwStyle;
+ if (pChild != NULL && (dwThisStyle & WS_MAXIMIZE))
+ dwNewStyle &= ~(WS_EX_CLIENTEDGE);
+ else
+ dwNewStyle |= WS_EX_CLIENTEDGE;
+
+ if (dwStyle != dwNewStyle)
+ {
+ HWND hwnd = GetWinHwnd(pFrameWnd->GetClientWindow());
+ ::RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN);
+ ::SetWindowLong(hwnd, GWL_EXSTYLE, dwNewStyle);
+ ::SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
+ SWP_FRAMECHANGED | SWP_NOACTIVATE |
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
+ SWP_NOCOPYBITS);
+ if (rect)
+ ::GetClientRect(hwnd, rect);
+
+ return TRUE;
+ }
+ }
+#endif // Win95
+
+ return FALSE;
+}
+
+// ===========================================================================
+// wxMDIClientWindow: the window of predefined (by Windows) class which
+// contains the child frames
+// ===========================================================================
+