void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageBox( wxT("Event sample shows different ways of using events\n")
- wxT("© 2001 Vadim Zeitlin"),
+ wxT("(c) 2001 Vadim Zeitlin"),
wxT("About Event Sample"), wxOK | wxICON_INFORMATION, this );
}
(wxEventFunction)
(wxCommandEventFunction)&MyFrame::OnDynamic);
+#if wxUSE_STATUSBAR
SetStatusText(_T("You can now use \"Dynamic\" item in the menu"));
SetStatusText(_T("Dynamic: on"), Status_Dynamic);
+#endif // wxUSE_STATUSBAR
}
else // connect
{
Disconnect(Event_Dynamic, wxID_ANY, wxEVT_COMMAND_MENU_SELECTED);
+#if wxUSE_STATUSBAR
SetStatusText(_T("You can no more use \"Dynamic\" item in the menu"));
SetStatusText(_T("Dynamic: off"), Status_Dynamic);
+#endif // wxUSE_STATUSBAR
}
}
{
PushEventHandler(new MyEvtHandler(++m_nPush));
+#if wxUSE_STATUSBAR
SetStatusText(wxString::Format(_T("Push count: %u"), m_nPush), Status_Push);
+#endif // wxUSE_STATUSBAR
}
void MyFrame::OnPopEventHandler(wxCommandEvent& WXUNUSED(event))
PopEventHandler(true /* delete handler */);
m_nPush--;
+#if wxUSE_STATUSBAR
SetStatusText(wxString::Format(_T("Push count: %u"), m_nPush), Status_Push);
+#endif // wxUSE_STATUSBAR
}
void MyFrame::OnTest(wxCommandEvent& WXUNUSED(event))