X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be5a51fb592f3fa2ba38ac6cd1e488d6d806058c..40711af81b4a412892045837997211d597d98ff2:/samples/vscroll/vstest.cpp?ds=sidebyside diff --git a/samples/vscroll/vstest.cpp b/samples/vscroll/vstest.cpp index eb44a21680..cddf8b9c6b 100644 --- a/samples/vscroll/vstest.cpp +++ b/samples/vscroll/vstest.cpp @@ -41,7 +41,7 @@ // the application icon (under Windows and OS/2 it is in resources) #if !defined(__WXMSW__) && !defined(__WXOS2__) - #include "mondrian.xpm" + #include "../sample.xpm" #endif // ---------------------------------------------------------------------------- @@ -89,7 +89,7 @@ private: class VScrollWindow : public wxVScrolledWindow { public: - VScrollWindow(wxFrame *frame) : wxVScrolledWindow(frame, -1) + VScrollWindow(wxFrame *frame) : wxVScrolledWindow(frame, wxID_ANY) { m_frame = frame; @@ -100,6 +100,7 @@ public: void OnIdle(wxIdleEvent&) { +#if wxUSE_STATUSBAR m_frame->SetStatusText(wxString::Format ( _T("Page size = %d, pos = %d, max = %d"), @@ -107,6 +108,7 @@ public: GetScrollPos(wxVERTICAL), GetScrollRange(wxVERTICAL) )); +#endif // wxUSE_STATUSBAR m_changed = false; } @@ -172,7 +174,7 @@ END_EVENT_TABLE() enum { // menu items - VScroll_Quit = 1, + VScroll_Quit = wxID_EXIT, // it is important for the id corresponding to the "About" command to have // this standard value as otherwise it won't be handled properly under Mac @@ -216,10 +218,10 @@ bool VScrollApp::OnInit() // and show it (the frames, unlike simple controls, are not shown when // created initially) - frame->Show(TRUE); + frame->Show(true); // ok - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -229,13 +231,13 @@ bool VScrollApp::OnInit() // frame constructor VScrollFrame::VScrollFrame() : wxFrame(NULL, - -1, + wxID_ANY, _T("VScroll wxWidgets Sample"), wxDefaultPosition, wxSize(400, 350)) { // set the frame icon - SetIcon(wxICON(mondrian)); + SetIcon(wxICON(sample)); #if wxUSE_MENUS // create a menu bar @@ -272,15 +274,15 @@ VScrollFrame::VScrollFrame() void VScrollFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { - // TRUE is to force the frame to close - Close(TRUE); + // true is to force the frame to close + Close(true); } void VScrollFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { wxMessageBox(_T("VScroll shows how to implement scrolling with\n") _T("variable line heights.\n") - _T("© 2003 Vadim Zeitlin"), + _T("(c) 2003 Vadim Zeitlin"), _T("About VScroll"), wxOK | wxICON_INFORMATION, this);