X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/256b8649ff5f7f9721878394e7cc5052129d3502..9149aa8c961e1bfccc159526eeee5dc089eaf906:/samples/mobile/styles/styles.cpp diff --git a/samples/mobile/styles/styles.cpp b/samples/mobile/styles/styles.cpp index cd92e50fe5..ddef0c19e6 100644 --- a/samples/mobile/styles/styles.cpp +++ b/samples/mobile/styles/styles.cpp @@ -2,7 +2,7 @@ // Name: styles.cpp // Author: Robert Roebling // Created: 04/07/02 -// Copyright: +// Copyright: ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -37,20 +37,22 @@ MyFrame::MyFrame( wxWindow *parent, wxWindowID id, const wxString &title, { // Create menu and status bar. CreateMyMenuBar(); +#if wxUSE_STATUSBAR CreateStatusBar(1); SetStatusText( _T("Welcome to Styles!") ); - +#endif // wxUSE_STATUSBAR + wxImage image; image.LoadFile( _T("marble.jpg"), wxBITMAP_TYPE_JPEG ); - + wxBitmap bitmap( image ); #ifdef __WXUNIVERSAL__ SetBackground( bitmap, 0, wxTILE ); #endif - - new wxStaticText( this, -1, _T("This is text"), wxPoint( 20,50 ) ); - - new wxCheckBox( this, -1, _T("This is a checkbox"), wxPoint( 20,70 ) ); + + new wxStaticText( this, wxID_ANY, _T("This is text"), wxPoint( 20,50 ) ); + + new wxCheckBox( this, wxID_ANY, _T("This is a checkbox"), wxPoint( 20,70 ) ); } void MyFrame::CreateMyMenuBar() @@ -62,7 +64,7 @@ void MyFrame::CreateMyMenuBar() wxMenuBar *menu_bar = new wxMenuBar(); menu_bar->Append( file_menu, _T("&File") ); - + SetMenuBar( menu_bar ); } @@ -72,7 +74,7 @@ void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) ) void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) ) { - Close( TRUE ); + Close( true ); } void MyFrame::OnCloseWindow( wxCloseEvent &WXUNUSED(event) ) @@ -86,21 +88,17 @@ void MyFrame::OnCloseWindow( wxCloseEvent &WXUNUSED(event) ) IMPLEMENT_APP(MyApp) -MyApp::MyApp() -{ -} - bool MyApp::OnInit() { wxInitAllImageHandlers(); SetVendorName(_T("Free world")); SetAppName(_T("Styles")); - - MyFrame *frame = new MyFrame( NULL, -1, _T("Styles"), wxPoint(20,20), wxSize(500,340) ); - frame->Show( TRUE ); - - return TRUE; + + MyFrame *frame = new MyFrame( NULL, wxID_ANY, _T("Styles"), wxPoint(20,20), wxSize(500,340) ); + frame->Show( true ); + + return true; } int MyApp::OnExit()