wxCanvas::OnEvent

void OnEvent(wxMouseEvent& event)

Sent to the canvas when the user has initiated an event with the mouse. Derive your own class to handle this message. See wxCanvas::OnChar for character events, and also wxMouseEvent for how to access event information.