#define EVT_MY_CUSTOM_COMMAND(id, fn) \
DECLARE_EVENT_TABLE_ENTRY( \
wxEVT_MY_CUSTOM_COMMAND, id, -1, \
- (wxObjectEventFunction)(wxEventFunction)(wxCommandEventFunction)&fn, \
+ (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, &fn ), \
(wxObject *) NULL \
),
SetStatusText(wxString::Format(_T("Push count: %u"), m_nPush), Status_Push);
}
-void MyFrame::OnTest(wxCommandEvent& event)
+void MyFrame::OnTest(wxCommandEvent& WXUNUSED(event))
{
wxLogMessage(_T("This is the test event handler in the main frame"));
}
// custom event methods
// ----------------------------------------------------------------------------
-void MyFrame::OnFireCustom(wxCommandEvent& event)
+void MyFrame::OnFireCustom(wxCommandEvent& WXUNUSED(event))
{
wxCommandEvent eventCustom(wxEVT_MY_CUSTOM_COMMAND);
wxPostEvent(this, eventCustom);
}
-void MyFrame::OnProcessCustom(wxCommandEvent& event)
+void MyFrame::OnProcessCustom(wxCommandEvent& WXUNUSED(event))
{
wxLogMessage(_T("Got a custom event!"));
}