X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34949efe0d10cecef8254d471b0f9ef5fe6cc7ed..60dbc04c461334f22c189fff24c16451e7cae7a5:/samples/scroll/scroll.cpp diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index e89e826881..c31e0f45a7 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -22,7 +22,7 @@ #include "wx/log.h" #include "wx/tglbtn.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif @@ -126,9 +126,9 @@ public: mbar->Append(menuFile, "&File"); SetMenuBar( mbar ); - Connect(wxID_DELETE, wxEVT_COMMAND_MENU_SELECTED, + Connect(wxID_DELETE, wxEVT_MENU, wxCommandEventHandler(MyCanvasFrame::OnDeleteAll)); - Connect(wxID_NEW, wxEVT_COMMAND_MENU_SELECTED, + Connect(wxID_NEW, wxEVT_MENU, wxCommandEventHandler(MyCanvasFrame::OnInsertNew)); Show(); @@ -797,7 +797,7 @@ MySizerScrolledWindow::MySizerScrolledWindow(wxWindow *parent) m_button = new wxButton( this, wxID_RESIZE_FRAME, "Press me", wxDefaultPosition, SMALL_BUTTON ); - sizer->Add(m_button, wxSizerFlags().Centre().Border(20)); + sizer->Add(m_button, wxSizerFlags().Centre().Border(wxALL, 20)); sizer->Add(new wxStaticText(this, wxID_ANY, "This is just"), wxSizerFlags().Centre()); sizer->Add(new wxStaticText(this, wxID_ANY, "some decoration"), @@ -809,7 +809,7 @@ MySizerScrolledWindow::MySizerScrolledWindow(wxWindow *parent) SetSizer( sizer ); - Connect(wxID_RESIZE_FRAME, wxEVT_COMMAND_BUTTON_CLICKED, + Connect(wxID_RESIZE_FRAME, wxEVT_BUTTON, wxCommandEventHandler(MySizerScrolledWindow::OnResizeClick)); } @@ -1233,10 +1233,8 @@ MyAutoScrollingWindow::DCNormalize(int x, int y, int w, int h) void MyAutoScrollingWindow::OnDraw(wxDC& dc) { dc.SetFont(m_font); - wxBrush normBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW) - , wxSOLID); - wxBrush selBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT) - , wxSOLID); + wxBrush normBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + wxBrush selBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT)); dc.SetPen(*wxTRANSPARENT_PEN); const wxString str = sm_testData; size_t strLength = str.length();