X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ad18dc32ccf198055de8824c9d78210a1fa8cfe..1b48afd23db9e8b5bfac8323c292b08f8f9f2e0e:/samples/checklst/checklst.cpp?ds=sidebyside diff --git a/samples/checklst/checklst.cpp b/samples/checklst/checklst.cpp index 07fef62c3a..b3373298da 100644 --- a/samples/checklst/checklst.cpp +++ b/samples/checklst/checklst.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows license /////////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ - //#pragma implementation -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -34,6 +30,10 @@ #include "wx/menuitem.h" #include "wx/checklst.h" +#if !wxUSE_CHECKLISTBOX + #error "This sample can't be built without wxUSE_CHECKLISTBOX" +#endif // wxUSE_CHECKLISTBOX + // Define a new application type class CheckListBoxApp: public wxApp { @@ -48,7 +48,7 @@ public: // ctor & dtor CheckListBoxFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h); - virtual ~CheckListBoxFrame(); + virtual ~CheckListBoxFrame(){}; // notifications void OnQuit(wxCommandEvent& event); @@ -124,7 +124,7 @@ bool CheckListBoxApp::OnInit(void) CheckListBoxFrame *pFrame = new CheckListBoxFrame ( NULL, - _T("wxWindows Checklistbox Sample"), + _T("wxWidgets Checklistbox Sample"), 50, 50, 480, 320 ); SetTopWindow(pFrame); @@ -138,11 +138,13 @@ CheckListBoxFrame::CheckListBoxFrame(wxFrame *frame, int x, int y, int w, int h) : wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)) { +#if wxUSE_STATUSBAR // create the status line const int widths[] = { -1, 60 }; CreateStatusBar(2); SetStatusWidths(2, widths); wxLogStatus(this, _T("no selection")); +#endif // wxUSE_STATUSBAR // Make a menubar // -------------- @@ -241,10 +243,6 @@ void CheckListBoxFrame::CreateCheckListbox(long flags) m_pListBox->Select(3); } -CheckListBoxFrame::~CheckListBoxFrame() -{ -} - void CheckListBoxFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { Close(true); @@ -252,7 +250,7 @@ void CheckListBoxFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void CheckListBoxFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { - wxMessageBox(wxT("Demo of wxCheckListBox control\n© Vadim Zeitlin 1998-2002"), + wxMessageBox(wxT("Demo of wxCheckListBox control\n(c) Vadim Zeitlin 1998-2002"), wxT("About wxCheckListBox"), wxICON_INFORMATION, this); }