Catching Mouse Events in a Form
It's very simple to capture various Windows events and use them to trigger events. All that is involved is qualifying the particular Windows message to capture, and then filling in the appropriate actions in a WINMSG event handler. The general outline is as follows:
- call Send_Message() with the "QUALIFY_EVENT" message parameter; generally this would be done on the CREATE event for the form
- write the event code in the WINMSG event handler; this event will be generated for each Windows message that is requested using "QUALIFY_EVENT".
The coding that follows illustrates how to capture mouse events at the window level and at the control level (for a button, for example).