WXUNUSED is a macro you'll use for the wxEvent parameter of a hollow event handler to make some compilers not to complain about unused parameters. This simple concept used to appear sometimes a problem for beginners because it seems to have been never explained anywhere openly before.
Usage example
void MyFrame::OnExit( wxEvent& WXUNUSED(event) ) { // Do Something }
another article qutoed as the following:
In many examples I have noted that the event methods are declared like: void OnEvent(wxCommandEvent& WXUNUSED(event)); What does WXUNUSED do?As I understand it, it's a way to prevent the compiler from issuing "unused parameter" warnings when you write a function that's called from the EVENT_TABLE, but don't use the event parameter..[ciach]void frm::btnquit_click(wxCommandEvent & WXUNUSED(event)){ Destroy(); } And the compiler won't complain :)The compiler won't complain if you do: void frm::btnquit_click(wxCommandEvent & ) { .... }; (at least gcc won't complain)