X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c9955d147ed92cdd79d795ed94d6e03fca06a52..6d06e061dc11140151be2914c30c759ee15e3fe7:/contrib/samples/deprecated/resource/resource.cpp diff --git a/contrib/samples/deprecated/resource/resource.cpp b/contrib/samples/deprecated/resource/resource.cpp index 8553ccb6f6..accc638501 100644 --- a/contrib/samples/deprecated/resource/resource.cpp +++ b/contrib/samples/deprecated/resource/resource.cpp @@ -26,8 +26,8 @@ #include "wx/deprecated/setup.h" -#if !wxUSE_RESOURCES - #error "You should set wxUSE_RESOURCES to 1 to compile this sample" +#if !wxUSE_WX_RESOURCES + #error "You should set wxUSE_WX_RESOURCES to 1 to compile this sample" #endif #if wxUSE_UNICODE @@ -41,7 +41,7 @@ // 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. @@ -103,12 +103,14 @@ bool MyApp::OnInit(void) #endif // Create the main frame window - frame = new MyFrame( (wxFrame *) NULL, -1, - wxT("wxWindows Resource Sample"), - wxPoint(-1, -1), wxSize(300, 250) ); + frame = new MyFrame( (wxFrame *) NULL, wxID_ANY, + wxT("wxWidgets Resource Sample"), + wxDefaultPosition, wxSize(300, 250) ); +#if wxUSE_STATUSBAR // Give it a status line frame->CreateStatusBar(2); +#endif // wxUSE_STATUSBAR wxMenuBar *menu_bar = wxResourceCreateMenuBar(wxT("menu1")); @@ -116,13 +118,13 @@ bool MyApp::OnInit(void) frame->SetMenuBar(menu_bar); // Make a panel - frame->panel = new MyPanel( frame, -1, wxPoint(0, 0), wxSize(400, 400), + frame->panel = new MyPanel( frame, wxID_ANY, wxPoint(0, 0), wxSize(400, 400), 0, wxT("MyMainFrame") ); - frame->Show(TRUE); + frame->Show(true); SetTopWindow(frame); - return TRUE; + return true; } MyApp::~MyApp() @@ -172,14 +174,14 @@ 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); } void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) ) { - Close(TRUE); + Close(true); } void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) ) @@ -191,13 +193,13 @@ void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) ) wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName(wxT("multitext3"), dialog); if (text) { - text->SetValue(wxT("wxWindows resource demo")); + text->SetValue(wxT("wxWidgets resource demo")); } dialog->ShowModal(); } - dialog->Close(TRUE); + dialog->Close(true); } BEGIN_EVENT_TABLE(MyDialog, wxDialog)