X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/820893d0d41b94b22dada287355ad27489c21721..19b44116d5c04181f9a20f92546cff26405ed115:/contrib/samples/deprecated/resource/resource.cpp diff --git a/contrib/samples/deprecated/resource/resource.cpp b/contrib/samples/deprecated/resource/resource.cpp index 4045cf99ef..4aaf51eca0 100644 --- a/contrib/samples/deprecated/resource/resource.cpp +++ b/contrib/samples/deprecated/resource/resource.cpp @@ -24,22 +24,24 @@ #include "wx/wx.h" #endif -#if !wxUSE_RESOURCES - #error "You should set wxUSE_RESOURCES to 1 to compile this sample" +#include "wx/deprecated/setup.h" + +#if !wxUSE_WX_RESOURCES + #error "You should set wxUSE_WX_RESOURCES to 1 to compile this sample" #endif #if wxUSE_UNICODE // #error "This sample can't be compiled in Unicode mode." #endif // wxUSE_UNICODE -#include "wx/resource.h" +#include "wx/deprecated/resource.h" #include #include "resource.h" // If we wanted to demonstrate total platform independence, // then we'd use the dynamic file loading form for all platforms. -// But this shows how to embed the wxWindows resources +// But this shows how to embed the wxWidgets resources // in the program code/executable for UNIX and Windows // platforms. @@ -102,7 +104,7 @@ bool MyApp::OnInit(void) // Create the main frame window frame = new MyFrame( (wxFrame *) NULL, -1, - wxT("wxWindows Resource Sample"), + wxT("wxWidgets Resource Sample"), wxPoint(-1, -1), wxSize(300, 250) ); // Give it a status line @@ -170,8 +172,8 @@ MyFrame::MyFrame void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) ) { - wxMessageBox(wxT("wxWindows resource sample.\n") - wxT("(c) Julian Smart"), wxT("About wxWindows sample"), + wxMessageBox(wxT("wxWidgets resource sample.\n") + wxT("(c) Julian Smart"), wxT("About wxWidgets sample"), wxICON_INFORMATION | wxOK); } @@ -184,12 +186,12 @@ void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) ) { MyDialog *dialog = new MyDialog; - if (dialog->LoadFromResource(this, wxT("dialog1"))) + if (wxLoadFromResource(dialog, this, wxT("dialog1"))) { wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName(wxT("multitext3"), dialog); if (text) { - text->SetValue(wxT("wxWindows resource demo")); + text->SetValue(wxT("wxWidgets resource demo")); } dialog->ShowModal();