I am Writing a custom control & need to detect Mouse events. Been doing testing with wxFormBuilder to generate skeleton of my program while custom control is completely written independently.
Here is the object 2 object trees of skeleton from wxFormBuilder,
This is the code for mouse event connections, wxHistWidget is my custom control derived from wxPanel, for both
Code: Select all
Connect( wxEVT_MOTION, (wxObjectEventFunction)&wxHistWidget::OnMouseMove );
Connect( wxEVT_LEFT_DOWN, (wxObjectEventFunction)&wxHistWidget::OnMouseLDownClick );
Connect( wxEVT_MOUSEWHEEL, (wxObjectEventFunction)&wxHistWidget::OnMouseWheel );
Thanks
sam