+ // The third is the function handler for the event -
+ // You need to cast it to the specific event handler
+ // type, then to a wxEventFunction, then to a
+ // wxObjectEventFunction - I.E.
+ // (wxObjectEventFunction)(wxEventFunction)
+ // (wxCommandEventFunction) &MyFrame::MyHandler
+ //
+ // The fourth is an optional userdata param -
+ // this is of historical relevance only and is
+ // there only for backwards compatability.
+ //
+ // The fifth is the context in which to call the
+ // handler - by default (this param is optional)
+ // this. For example in your event handler
+ // if you were to call "this->MyFunc()"
+ // it would literally do this->MyFunc. However,
+ // if you were to pass myHandler as the fifth
+ // parameter, for instance, you would _really_
+ // be calling myHandler->MyFunc, even though
+ // the compiler doesn't really know it.
+ //
+
+ //
+ // Menu events
+ //
+ this->Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED,
+ (wxObjectEventFunction) (wxEventFunction)
+ (wxCommandEventFunction) &MyFrame::OnQuit);
+
+ this->Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED,
+ (wxObjectEventFunction) (wxEventFunction)
+ (wxCommandEventFunction) &MyFrame::OnAbout);
+
+ this->Connect(wxID_LOOP, wxEVT_COMMAND_MENU_SELECTED,
+ (wxObjectEventFunction) (wxEventFunction)
+ (wxCommandEventFunction) &MyFrame::OnLoop);
+
+ this->Connect(wxID_OPENFILE, wxEVT_COMMAND_MENU_SELECTED,
+ (wxObjectEventFunction) (wxEventFunction)
+ (wxCommandEventFunction) &MyFrame::OnOpenFile);
+
+ this->Connect(wxID_PLAY, wxEVT_COMMAND_MENU_SELECTED,
+ (wxObjectEventFunction) (wxEventFunction)
+ (wxCommandEventFunction) &MyFrame::OnPlay);
+
+ this->Connect(wxID_PAUSE, wxEVT_COMMAND_MENU_SELECTED,
+ (wxObjectEventFunction) (wxEventFunction)
+ (wxCommandEventFunction) &MyFrame::OnPause);
+
+ this->Connect(wxID_STOP, wxEVT_COMMAND_MENU_SELECTED,
+ (wxObjectEventFunction) (wxEventFunction)
+ (wxCommandEventFunction) &MyFrame::OnStop);
+