I have class MyFrame : public wxFrame that is associated with (and the parent of) a number of other classes. Each of these other classes (controls) is an object on the frame (such as an image or text). I would like my parent class to process only the EVT_LEFT_UP event for all of these controls. I currently give each control a unique id, and I am attempting to connect them using the following line:
Connect(UNIQUE_ID, wxEVT_LEFT_UP, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) MyFrame::OnUniqueIDMouseUp );
The problem is that the function OnUniqueIDMouseUp never gets called. I've noticed that trying the above statement with the event type of "EVT_LEFT_UP" as opposed to "wxEVT_LEFT_UP" will not compile. I am not sure if this may be a source of the error or not. What could I be doing wrong? Or is there a better way of going about this? |