]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxFrame* wxXmlResource::LoadFrame(parent,name)
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 25 Aug 2002 12:14:37 +0000 (12:14 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 25 Aug 2002 12:14:37 +0000 (12:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xrc/xmlres.cpp
src/xrc/xmlres.cpp

index 21375aff6034109fda333ad1cba2d13278f849af..0a1b72cd3a352efede382725cee04ab4ecc9074c 100644 (file)
@@ -171,10 +171,7 @@ wxToolBar *wxXmlResource::LoadToolBar(wxWindow *parent, const wxString& name)
 
 wxDialog *wxXmlResource::LoadDialog(wxWindow *parent, const wxString& name)
 {
 
 wxDialog *wxXmlResource::LoadDialog(wxWindow *parent, const wxString& name)
 {
-    wxDialog *dialog = new wxDialog;
-    if (!LoadDialog(dialog, parent, name))
-        { delete dialog; return NULL; }
-    else return dialog;
+    return (wxDialog*)CreateResFromNode(FindResource(name, wxT("wxDialog")), parent, NULL);
 }
 
 bool wxXmlResource::LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name)
 }
 
 bool wxXmlResource::LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name)
index 21375aff6034109fda333ad1cba2d13278f849af..0a1b72cd3a352efede382725cee04ab4ecc9074c 100644 (file)
@@ -171,10 +171,7 @@ wxToolBar *wxXmlResource::LoadToolBar(wxWindow *parent, const wxString& name)
 
 wxDialog *wxXmlResource::LoadDialog(wxWindow *parent, const wxString& name)
 {
 
 wxDialog *wxXmlResource::LoadDialog(wxWindow *parent, const wxString& name)
 {
-    wxDialog *dialog = new wxDialog;
-    if (!LoadDialog(dialog, parent, name))
-        { delete dialog; return NULL; }
-    else return dialog;
+    return (wxDialog*)CreateResFromNode(FindResource(name, wxT("wxDialog")), parent, NULL);
 }
 
 bool wxXmlResource::LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name)
 }
 
 bool wxXmlResource::LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name)