From 4dd75a6aafab921defcd0b5cad9222280ef03db8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 25 Aug 2002 12:14:37 +0000 Subject: [PATCH] added wxFrame* wxXmlResource::LoadFrame(parent,name) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/xrc/xmlres.cpp | 5 +---- src/xrc/xmlres.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index 21375aff60..0a1b72cd3a 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -171,10 +171,7 @@ wxToolBar *wxXmlResource::LoadToolBar(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) diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 21375aff60..0a1b72cd3a 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -171,10 +171,7 @@ wxToolBar *wxXmlResource::LoadToolBar(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) -- 2.45.2