]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/checklst/checklst.cpp
Move oleacc.lib from the VC++ projects/makefiles to libraries.h
[wxWidgets.git] / samples / checklst / checklst.cpp
index 07fef62c3a6403920fc57e51e460e76dd3d9dd7a..b3373298dadca2e7719009135dcacd989ca4722d 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows license
 ///////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows license
 ///////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-    //#pragma implementation
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #include  "wx/menuitem.h"
 #include  "wx/checklst.h"
 
 #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
 {
 // 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);
     // 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);
 
     // notifications
     void OnQuit(wxCommandEvent& event);
@@ -124,7 +124,7 @@ bool CheckListBoxApp::OnInit(void)
     CheckListBoxFrame *pFrame = new CheckListBoxFrame
                                     (
                                      NULL,
     CheckListBoxFrame *pFrame = new CheckListBoxFrame
                                     (
                                      NULL,
-                                     _T("wxWindows Checklistbox Sample"),
+                                     _T("wxWidgets Checklistbox Sample"),
                                      50, 50, 480, 320
                                     );
     SetTopWindow(pFrame);
                                      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))
 {
                                      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"));
     // 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
     // --------------
 
     // Make a menubar
     // --------------
@@ -241,10 +243,6 @@ void CheckListBoxFrame::CreateCheckListbox(long flags)
     m_pListBox->Select(3);
 }
 
     m_pListBox->Select(3);
 }
 
-CheckListBoxFrame::~CheckListBoxFrame()
-{
-}
-
 void CheckListBoxFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 {
     Close(true);
 void CheckListBoxFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 {
     Close(true);
@@ -252,7 +250,7 @@ void CheckListBoxFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 
 void CheckListBoxFrame::OnAbout(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);
 }
                  wxT("About wxCheckListBox"),
                  wxICON_INFORMATION, this);
 }