// headers
// ---------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "mdig.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#pragma hdrstop
#endif
+#if wxUSE_MDI
+
+#include "wx/generic/mdig.h"
+
#ifndef WX_PRECOMP
#include "wx/panel.h"
#include "wx/menu.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
-#include "wx/generic/mdig.h"
+#include "wx/stockitem.h"
enum MDI_MENU_ID
{
#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
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()
{
if (pMenuBar && m_pWindowMenu)
{
- int pos = pMenuBar->FindMenu(wxStripMenuCodes(wxString(_("&Help"))));
+ int pos = pMenuBar->FindMenu(wxGetStockLabel(wxID_HELP,false));
if (pos == wxNOT_FOUND)
{
pMenuBar->Append(m_pWindowMenu, _("&Window"));
Create( parent, id, title, wxDefaultPosition, size, style, name );
}
-#include "wx/log.h"
wxGenericMDIChildFrame::~wxGenericMDIChildFrame()
{
wxGenericMDIParentFrame *pParentFrame = GetMDIParentFrame();
IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxGenericMDIChildFrame)
IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxGenericMDIClientWindow)
-#endif
+#endif // wxUSE_GENERIC_MDI_AS_NATIVE
+
+#endif // wxUSE_MDI