]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
rewritten to use wxTheMimeTypesManager
[wxWidgets.git] / src / msw / mdi.cpp
index d59e323f81915c237695a0d25e43c0aec16b99d4..342366110f2ccf36c512e79be4a5c38ce5125797 100644 (file)
@@ -35,7 +35,9 @@
     #include "wx/app.h"
     #include "wx/utils.h"
     #include "wx/dialog.h"
-    #include "wx/statusbr.h"
+    #if wxUSE_STATUSBAR
+        #include "wx/statusbr.h"
+    #endif
     #include "wx/settings.h"
     #include "wx/intl.h"
     #include "wx/log.h"
 #include "wx/mdi.h"
 #include "wx/msw/private.h"
 
-#if wxUSE_NATIVE_STATUSBAR
+#if wxUSE_STATUSBAR && wxUSE_NATIVE_STATUSBAR
     #include "wx/msw/statbr95.h"
 #endif
 
+#if wxUSE_TOOLBAR
+    #include "wx/toolbar.h"
+#endif // wxUSE_TOOLBAR
+
 #include <string.h>
 
 // ---------------------------------------------------------------------------
@@ -57,8 +63,8 @@
 extern wxWindowList wxModelessWindows;      // from dialog.cpp
 extern wxMenu *wxCurrentPopupMenu;
 
-extern wxChar wxMDIFrameClassName[];
-extern wxChar wxMDIChildFrameClassName[];
+extern const wxChar *wxMDIFrameClassName;
+extern const wxChar *wxMDIChildFrameClassName;
 extern wxWindow *wxWndHook;                 // from window.cpp
 
 extern void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win);
@@ -113,11 +119,9 @@ static void UnpackMDIActivate(WXWPARAM wParam, WXLPARAM lParam,
 // wxWin macros
 // ---------------------------------------------------------------------------
 
-#if !USE_SHARED_LIBRARY
     IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame)
     IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame)
     IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow)
-#endif // USE_SHARED_LIBRARY
 
 BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame)
     EVT_SIZE(wxMDIParentFrame::OnSize)
@@ -206,6 +210,8 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
 wxMDIParentFrame::~wxMDIParentFrame()
 {
     DestroyChildren();
+    // already delete by DestroyChildren()
+    m_frameToolBar = NULL;
 
     ::DestroyMenu((HMENU)m_windowMenu);
     m_windowMenu = 0;