X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b62ca03d6f409732ca63c68a79b7ae81444222e5..eed8659474aaf84eb8db85060ebee455165d8137:/samples/scroll/scroll.cpp diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index f0725ee57d..4b60e0ab04 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -37,7 +37,7 @@ class MyCanvas: public wxScrolledWindow public: MyCanvas() {} MyCanvas( wxWindow *parent, wxWindowID, const wxPoint &pos, const wxSize &size ); - ~MyCanvas(); + ~MyCanvas(){}; void OnPaint( wxPaintEvent &event ); void OnQueryPosition( wxCommandEvent &event ); void OnAddButton( wxCommandEvent &event ); @@ -217,7 +217,7 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id, m_button = new wxButton( this, ID_QUERYPOS, "Query position", wxPoint(10,110) ); - (void) new wxTextCtrl( this, wxID_ANY, "wxTextCtrl", wxPoint(10,150), wxSize(80,wxDefaultSize.y) ); + (void) new wxTextCtrl( this, wxID_ANY, "wxTextCtrl", wxPoint(10,150), wxSize(80,wxDefaultCoord) ); (void) new wxRadioButton( this, wxID_ANY, "Disable", wxPoint(10,190) ); @@ -272,10 +272,6 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id, SetCursor( wxCursor( wxCURSOR_IBEAM ) ); } -MyCanvas::~MyCanvas() -{ -} - void MyCanvas::OnMouseDown( wxMouseEvent &event ) { if (event.LeftDown()) @@ -334,7 +330,7 @@ void MyCanvas::OnMoveButton( wxCommandEvent &event ) wxWindow *win = FindWindow( event.GetId() ); wxPoint pt( win->GetPosition() ); wxLogMessage( wxT("-> Position before move is %d %d"), pt.x, pt.y ); - win->Move( wxDefaultPosition.x, pt.y + 10 ); + win->Move( wxDefaultCoord, pt.y + 10 ); pt = win->GetPosition(); wxLogMessage( wxT("-> Position after move is %d %d"), pt.x, pt.y ); } @@ -453,9 +449,11 @@ MyFrame::MyFrame() SetMenuBar( menu_bar ); +#if wxUSE_STATUSBAR CreateStatusBar(2); int widths[] = { -1, 100 }; SetStatusWidths( 2, widths ); +#endif // wxUSE_STATUSBAR wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );