I appear to have followed this example (found under "Defining Your Own Event Class"), and my code compiles and runs without error, but I'm not catching the event anywhere.
The code:
class MyCustomEvent : public wxEvent
{
//... stuff here
};
wxDEFINE_EVENT(MY_CUSTOM_EVENT_1,MyCustomEvent);
and later I bind the event:
Bind(MY_CUSTOM_EVENT_1, &MyApp::OnProcessCustom, this);
and later I throw an event of that type:
MyCustomEvent* eventCustom = new MyCustomEvent(MY_CUSTOM_EVENT_1);
eventCustom->SetEventObject(this);
this->QueueEvent(eventCustom); //this is MyApp
Unfortunately, after the event is thrown, it's never caught by OnProcessCustom.
Any ideas?
Note: Similar, but not the same as this question.