Contents Up Previous Next

OnMenuCommand

You need to replace this virtual function with a series of non-virtual functions, one for each case of your old switch statement. Each function takes a wxCommandEvent& argument. Create an event table for your frame containing EVT_MENU macros, and insert DECLARE_EVENT_TABLE() in your frame class, as per the samples.