X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4db172a3b318df9aff178eb6c5da149d56e0859..b96ad10292136c937f71d46ecd7339e59e084c76:/src/generic/mdig.cpp diff --git a/src/generic/mdig.cpp b/src/generic/mdig.cpp index 4f002030ea..d97213d797 100644 --- a/src/generic/mdig.cpp +++ b/src/generic/mdig.cpp @@ -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() @@ -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 +