]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_mdi.cpp
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / src / xrc / xh_mdi.cpp
index be0882245f8273b22d8f3de42ebe1bbe8eae2c75..021934231e646e83c141ad43a075ba928854fbc6 100644 (file)
@@ -1,9 +1,8 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        src/xrc/xh_mdi.cpp
-// Purpose:     XRC resource for dialogs
+// Purpose:     XRC resource for wxMDI
 // Author:      David M. Falkinder & Vaclav Slavik
 // Created:     14/02/2005
-// RCS-ID:      $Id$
 // Copyright:   (c) 2005 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 #if wxUSE_XRC && wxUSE_MDI
 
 #include "wx/xrc/xh_mdi.h"
+#include "wx/mdi.h"
 
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/dialog.h" // to get wxDEFAULT_DIALOG_STYLE
-    #include "wx/mdi.h"
 #endif
 
 IMPLEMENT_DYNAMIC_CLASS(wxMdiXmlHandler, wxXmlResourceHandler)
@@ -88,7 +87,7 @@ wxWindow *wxMdiXmlHandler::CreateFrame()
 
         if ( !mdiParent )
         {
-            wxLogError(wxT("Parent of wxMDIParentFrame must be wxMDIParentFrame."));
+            ReportError("parent of wxMDIChildFrame must be wxMDIParentFrame");
             return NULL;
         }
 
@@ -117,7 +116,7 @@ wxObject *wxMdiXmlHandler::DoCreateResource()
     {
         wxFrame* f = wxDynamicCast(frame, wxFrame);
         if (f)
-            f->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON));
+            f->SetIcons(GetIconBundle(wxT("icon"), wxART_FRAME_ICON));
     }
 
     SetupWindow(frame);