]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/mdig.cpp
use wxStockCursor (as documented and as already implemented in wxMotif) instead of...
[wxWidgets.git] / src / generic / mdig.cpp
index 4f002030ea2783ca5283bf256424419e697fdb93..a64b5e77b18b49caa90c49d93f8cee95973d9d49 100644 (file)
@@ -24,6 +24,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_MDI
+
 #include "wx/generic/mdig.h"
 
 #ifndef WX_PRECOMP
@@ -118,11 +120,12 @@ bool wxGenericMDIParentFrame::Create(wxWindow *parent,
 #endif // wxUSE_MENUS
   }
 
-  wxFrame::Create( parent, id, title, pos, size, style, name );
+  if ( !wxFrame::Create( parent, id, title, pos, size, style, name ) )
+      return false;
 
-  OnCreateClient();
+  m_pClientWindow = OnCreateClient();
 
-  return true;
+  return m_pClientWindow != NULL;
 }
 
 #if wxUSE_MENUS
@@ -246,11 +249,10 @@ wxGenericMDIClientWindow *wxGenericMDIParentFrame::GetClientWindow() const
 wxGenericMDIClientWindow *wxGenericMDIParentFrame::OnCreateClient()
 {
 #if wxUSE_GENERIC_MDI_AS_NATIVE
-    m_pClientWindow = new wxMDIClientWindow( this );
+    return new wxMDIClientWindow( this );
 #else
-    m_pClientWindow = new wxGenericMDIClientWindow( this );
+    return new wxGenericMDIClientWindow( this );
 #endif
-    return m_pClientWindow;
 }
 
 void wxGenericMDIParentFrame::ActivateNext()
@@ -773,7 +775,7 @@ void wxGenericMDIClientWindow::PageChanged(int OldSelection, int newSelection)
     }
 }
 
-void wxGenericMDIClientWindow::OnPageChanged(wxNotebookEvent& event)
+void wxGenericMDIClientWindow::OnPageChanged(wxBookCtrlEvent& event)
 {
     PageChanged(event.GetOldSelection(), event.GetSelection());
 
@@ -812,4 +814,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxGenericMDIParentFrame)
 IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxGenericMDIChildFrame)
 IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxGenericMDIClientWindow)
 
-#endif
+#endif // wxUSE_GENERIC_MDI_AS_NATIVE
+
+#endif // wxUSE_MDI
+