X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/38f74dffc11f9afca3e1ad20ac2b1146fc75a1b3..43cb7161a01924c1fc29e01f6df740215c33b4ff:/samples/minimal/minimal.cpp diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index e1f25e73a8..80bf766199 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -16,10 +16,10 @@ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- - + // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" - + #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -40,7 +40,6 @@ #include "../sample.xpm" #endif -//###include "dmalloc.h" // ---------------------------------------------------------------------------- // private classes // ---------------------------------------------------------------------------- @@ -126,7 +125,7 @@ bool MyApp::OnInit() return false; // create the main application window - MyFrame *frame = new MyFrame(_T("Minimal wxWidgets App")); + MyFrame *frame = new MyFrame("Minimal wxWidgets App"); // and show it (the frames, unlike simple controls, are not shown when // created initially) @@ -149,22 +148,20 @@ MyFrame::MyFrame(const wxString& title) // set the frame icon SetIcon(wxICON(sample)); -// char * c = new char [100] ; -// strcpy (c, "hello"); #if wxUSE_MENUS // create a menu bar wxMenu *fileMenu = new wxMenu; // the "About" item should be in the help menu wxMenu *helpMenu = new wxMenu; - helpMenu->Append(Minimal_About, "hello", _T("Show about dialog")); + helpMenu->Append(Minimal_About, "&About...\tF1", "Show about dialog"); - fileMenu->Append(Minimal_Quit, _T("E&xit\tAlt-X"), _T("Quit this program")); + fileMenu->Append(Minimal_Quit, "E&xit\tAlt-X", "Quit this program"); // now append the freshly created menu to the menu bar... wxMenuBar *menuBar = new wxMenuBar(); - menuBar->Append(fileMenu, _T("&File")); - menuBar->Append(helpMenu, _T("&Help")); + menuBar->Append(fileMenu, "&File"); + menuBar->Append(helpMenu, "&Help"); // ... and attach this menu bar to the frame SetMenuBar(menuBar); @@ -173,7 +170,7 @@ MyFrame::MyFrame(const wxString& title) #if wxUSE_STATUSBAR // create a status bar just for fun (by default with 1 pane only) CreateStatusBar(2); - SetStatusText(_T("Welcome to wxWidgets!")); + SetStatusText("Welcome to wxWidgets!"); #endif // wxUSE_STATUSBAR } @@ -188,15 +185,16 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { - wxMessageBox(wxString::Format( - _T("Welcome to %s!\n") - _T("\n") - _T("This is the minimal wxWidgets sample\n") - _T("running under %s."), + wxMessageBox(wxString::Format + ( + "Welcome to %s!\n" + "\n" + "This is the minimal wxWidgets sample\n" + "running under %s.", wxVERSION_STRING, - wxGetOsDescription().c_str() + wxGetOsDescription() ), - _T("About wxWidgets minimal sample"), + "About wxWidgets minimal sample", wxOK | wxICON_INFORMATION, this); }