X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7880889720de18a19e58653cb3b07da99053e7db..cd15bcaf50ead53ccf9d50965312f0dc754affb4:/samples/minimal/minimal.cpp?ds=sidebyside diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index d21c2524f3..a78e462908 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 @@ -36,7 +36,7 @@ // 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 @@ -68,22 +68,6 @@ public: void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); - void OnPaint(wxPaintEvent&) - { - wxPaintDC dc(this); - - wxFont font = GetFont(); - - for ( int size = 10; size < 20; size++ ) - { - font.SetPixelSize(wxSize(0, size)); - dc.SetFont(font); - dc.DrawText(wxString::Format("%dpx The quick brown fox jumps over the lazy dog.", size), - 10, 10 + (size - 10)*20); - } - } - - private: // any class wishing to process wxWidgets events must use this macro DECLARE_EVENT_TABLE() @@ -115,7 +99,6 @@ enum BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Minimal_Quit, MyFrame::OnQuit) EVT_MENU(Minimal_About, MyFrame::OnAbout) - EVT_PAINT(MyFrame::OnPaint) END_EVENT_TABLE() // Create a new application object: this macro will allow wxWidgets to create @@ -171,7 +154,7 @@ MyFrame::MyFrame(const wxString& title) // the "About" item should be in the help menu wxMenu *helpMenu = new wxMenu; - helpMenu->Append(Minimal_About, "&About...\tF1", "Show about dialog"); + helpMenu->Append(Minimal_About, "&About\tF1", "Show about dialog"); fileMenu->Append(Minimal_Quit, "E&xit\tAlt-X", "Quit this program");