]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_mdi.cpp
Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git] / src / xrc / xh_mdi.cpp
index a290dd923a66ce7f20fee877af3a08c2c1d715f8..7a581f80779374a2f9118030aabc84047d82b3e6 100644 (file)
@@ -62,7 +62,7 @@ wxMdiXmlHandler::wxMdiXmlHandler() : wxXmlResourceHandler()
     AddWindowStyles();
 }
 
-wxFrame *wxMdiXmlHandler::CreateFrame()
+wxWindow *wxMdiXmlHandler::CreateFrame()
 {
     if (m_class == wxT("wxMDIParentFrame"))
     {
@@ -99,14 +99,18 @@ wxFrame *wxMdiXmlHandler::CreateFrame()
 
 wxObject *wxMdiXmlHandler::DoCreateResource()
 {
-    wxFrame *frame = CreateFrame();
+    wxWindow *frame = CreateFrame();
 
     if (HasParam(wxT("size")))
         frame->SetClientSize(GetSize());
     if (HasParam(wxT("pos")))
         frame->Move(GetPosition());
     if (HasParam(wxT("icon")))
-        frame->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON));
+    {
+        wxFrame* f = wxDynamicCast(frame, wxFrame);
+        if (f)
+            f->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON));
+    }
 
     SetupWindow(frame);