bool MyApp::OnInit()
{
wxImage::AddHandler(new wxGIFHandler);
- wxTheXmlResource->InitAllHandlers();
- wxTheXmlResource->Load("rc/resource.xrc");
+ wxXmlResource::Get()->InitAllHandlers();
+ wxXmlResource::Get()->Load("rc/resource.xrc");
MyFrame *frame = new MyFrame("XML resources demo",
wxPoint(50, 50), wxSize(450, 340));
{
SetIcon(wxICON(appicon));
- SetMenuBar(wxTheXmlResource->LoadMenuBar("mainmenu"));
- SetToolBar(wxTheXmlResource->LoadToolBar(this, "toolbar"));
+ SetMenuBar(wxXmlResource::Get()->LoadMenuBar("mainmenu"));
+ SetToolBar(wxXmlResource::Get()->LoadToolBar(this, "toolbar"));
}
void MyFrame::OnDlg1(wxCommandEvent& WXUNUSED(event))
{
wxDialog dlg;
- wxTheXmlResource->LoadDialog(&dlg, this, "dlg1");
+ wxXmlResource::Get()->LoadDialog(&dlg, this, "dlg1");
dlg.ShowModal();
}
void MyFrame::OnDlg2(wxCommandEvent& WXUNUSED(event))
{
wxDialog dlg;
- wxTheXmlResource->LoadDialog(&dlg, this, "dlg2");
+ wxXmlResource::Get()->LoadDialog(&dlg, this, "dlg2");
dlg.ShowModal();
}