I seem to have followed this example (found in the section "Defining Your Own Event Class") , and my code compiles and runs without errors, but I will not catch anyone.
The code:
class MyCustomEvent : public wxEvent
{
};
wxDEFINE_EVENT(MY_CUSTOM_EVENT_1,MyCustomEvent);
and later I bind the event:
Bind(MY_CUSTOM_EVENT_1, &MyApp::OnProcessCustom, this);
and then I throw an event of this type:
MyCustomEvent* eventCustom = new MyCustomEvent(MY_CUSTOM_EVENT_1);
eventCustom->SetEventObject(this);
this->QueueEvent(eventCustom); //this is MyApp
Unfortunately, after an event is selected, it never gets into OnProcessCustom.
Any ideas?
Note: It seems, but not the same, as this question .
source
share