MouseEventHandler
The MMouseEventHandler class is a mixin class; allowing you to add its functionality to any application. Three types of events that you will need to manage are:
Using MMouseEventHandler
Using the mixin class is very easy. Simply inherit from MMouseEventHandler and override the appropriate member functions. Five functions you need to override are:
You can access this amount using the TMouseDownEvent::GetClickCount method. The GetClickCount member function returns the number of clicks so it is a simple matter to override the MMouseEventHandler::MouseDown method and compare the number of clicks found to the number that you are expecting.
The TMouseDownEvent holds the count of down clicks, and the TMouseUpEvent holds the count of up clicks. Both hold this click count for the most recent button pressed (to accommodate multibutton mice).
NOTE
You should note that a double-click sequence is seen by an application as a series of two TMouseDownEvents. The first TMouseDownEvent object will return a click count of one. The second TMouseDownEvent will return a click count of two (the double click).