]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix to MDI to restore 3D border; kludge to OGL Studio sample to redraw
authorJulian Smart <julian@anthemion.co.uk>
Thu, 24 Feb 2000 20:18:09 +0000 (20:18 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 24 Feb 2000 20:18:09 +0000 (20:18 +0000)
the first client frame properly (need wxWindow::Redraw in wxWin API?)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/mdi.cpp
utils/ogl/samples/studio/mainfrm.cpp

index 8e213d82129e1bce3be7df131b6a89f9eb2ee02d..b5fef838da3ad625a3c8f33e939e7c2eea143db2 100644 (file)
@@ -996,7 +996,7 @@ bool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate),
     }
     else
     {
-        // we have nothing to with it
+        // we have nothing to do with it
         return FALSE;
     }
 
@@ -1076,6 +1076,10 @@ void wxMDIChildFrame::MSWDestroyWindow()
     HWND oldHandle = (HWND)GetHWND();
     SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_MDIDESTROY,
                 (WPARAM)oldHandle, 0);
+
+    if (parent->GetActiveChild() == (wxMDIChildFrame*) NULL)
+        ResetWindowStyle((void*) NULL);
+
     invalidHandle = 0;
 
     if (m_hMenu)
index eb0560ca41d7e64d2102731a2822bedd742222e6..77c1751ac339454a6529e265e41d959b456b202d 100644 (file)
@@ -180,6 +180,23 @@ void csFrame::OnIdle(wxIdleEvent& event)
     {
         wxLayoutAlgorithm layout;
         layout.LayoutMDIFrame(this);
+
+#if defined(__WXMSW__) && defined(__WIN95__)
+        // Need to do something else to get it to refresh properly
+        // when a client frame is first displayed; moving the client
+        // window doesn't cause the proper refresh. Just refreshing the
+        // client doesn't work (presumably because it's clipping the
+        // children).
+        // TODO: how to put this fix in wxWindows, and not the app.
+        // How about at least having a wxWindow::RedrawWindow?
+        wxMDIChildFrame* childFrame = GetActiveChild();
+        if (childFrame)
+        {
+            HWND hWnd = (HWND) childFrame->GetHWND();
+            ::RedrawWindow(hWnd, NULL, NULL, RDW_FRAME|RDW_ALLCHILDREN|RDW_INVALIDATE );
+
+        }
+#endif
     }
 }