]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/samples/deprecated/resource/resource.cpp
Bumping the version number also requires that version.h be modified,
[wxWidgets.git] / contrib / samples / deprecated / resource / resource.cpp
index 548f4ae8acb24e2a1eaaf555add11e5f8afbca37..7d0bb7b9c8cb3bd4b0ded3a1b5728b13b3e2f810 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-// #pragma implementation
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -41,7 +37,7 @@
 
 // If we wanted to demonstrate total platform independence,
 // then we'd use the dynamic file loading form for all platforms.
 
 // 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.
 
 // in the program code/executable for UNIX and Windows
 // platforms.
 
@@ -103,12 +99,14 @@ bool MyApp::OnInit(void)
 #endif
 
     // Create the main frame window
 #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);
     // Give it a status line
     frame->CreateStatusBar(2);
+#endif // wxUSE_STATUSBAR
 
     wxMenuBar *menu_bar = wxResourceCreateMenuBar(wxT("menu1"));
 
 
     wxMenuBar *menu_bar = wxResourceCreateMenuBar(wxT("menu1"));
 
@@ -116,13 +114,13 @@ bool MyApp::OnInit(void)
     frame->SetMenuBar(menu_bar);
 
     // Make a panel
     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") );
                                 0, wxT("MyMainFrame") );
-    frame->Show(TRUE);
+    frame->Show(true);
 
     SetTopWindow(frame);
 
 
     SetTopWindow(frame);
 
-    return TRUE;
+    return true;
 }
 
 MyApp::~MyApp()
 }
 
 MyApp::~MyApp()
@@ -172,14 +170,14 @@ MyFrame::MyFrame
 
 void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) )
 {
 
 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) )
 {
                  wxICON_INFORMATION | wxOK);
 }
 
 void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) )
 {
-    Close(TRUE);
+    Close(true);
 }
 
 void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) )
 }
 
 void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) )
@@ -191,13 +189,13 @@ void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) )
         wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName(wxT("multitext3"), dialog);
         if (text)
         {
         wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName(wxT("multitext3"), dialog);
         if (text)
         {
-            text->SetValue(wxT("wxWindows resource demo"));
+            text->SetValue(wxT("wxWidgets resource demo"));
         }
 
         dialog->ShowModal();
     }
 
         }
 
         dialog->ShowModal();
     }
 
-    dialog->Close(TRUE);
+    dialog->Close(true);
 }
 
 BEGIN_EVENT_TABLE(MyDialog, wxDialog)
 }
 
 BEGIN_EVENT_TABLE(MyDialog, wxDialog)