// Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
- //#pragma implementation
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.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
{
// 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);
CheckListBoxFrame *pFrame = new CheckListBoxFrame
(
NULL,
- _T("wxWindows Checklistbox Sample"),
+ _T("wxWidgets Checklistbox Sample"),
50, 50, 480, 320
);
SetTopWindow(pFrame);
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
// --------------
m_pListBox->Select(3);
}
-CheckListBoxFrame::~CheckListBoxFrame()
-{
-}
-
void CheckListBoxFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close(true);
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);
}