// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-
+
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
-
+
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// the application icon (under Windows and OS/2 it is in resources and even
// though we could still include the XPM here it would be unused)
-#if !defined(__WXMSW__) && !defined(__WXPM__)
+#ifndef wxHAS_IMAGES_IN_RESOURCES
#include "../sample.xpm"
#endif
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)
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
- helpMenu->Append(Minimal_About, _T("&About...\tF1"), _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);
#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
-
- wxTextCtrl* text = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_DONTWRAP );
- text->SetValue( wxT("0 /////////////////////////////////////////////////////////////////////////////\n\
-1 // Name: minimal.cpp\n\
-2 // Purpose: Minimal wxWidgets sample\n\
-3 // Author: Julian Smart\n\
-4 // Modified by:\n\
-5 // Created: 04/01/98\n\
-6 // RCS-ID: $Id$\n\
-7 // Copyright: (c) Julian Smart\n\
-8 // Licence: wxWindows licence\n\
-9 /////////////////////////////////////////////////////////////////////////////\n\
-") );
-
- text->WriteText( wxT("10 /////////////////////////////////////////////////////////////////////////////\n\
-11 // Name: minimal.cpp\n\
-12 // Purpose: Minimal wxWidgets sample\n\
-13 // Author: Julian Smart\n\
-14 // Modified by:\n\
-15 // Created: 04/01/98\n\
-16 // RCS-ID: $Id$\n\
-17 // Copyright: (c) Julian Smart\n\
-18 // Licence: wxWindows licence\n\
-19 /////////////////////////////////////////////////////////////////////////////") );
}
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);
}