|
|
atlvbevents.hTwo plug-in ATL classes for your ActiveX controls.The classes consist of custom message map handlers. They implement the standard Visual Basic 6 mouse and keyboard events:
All you need to do is to copy'n'paste the IDL code from
the file, let the wizard generate the Connection Point
code and chain the classes in your message map.
The classes will not eat your Windows messages, so you can still overload the behaviour of all the events. How to use itCopy the IDL code from the class file into the control's IDL file
Compile the modified IDL file.
Let the ATL wizard generate a new Connection Point class (right-click in the class-browser and choose the "Implement Connection point" menu item). Then add the event class to the class list...
Chain the event class to the message map...
And there you have your keyboard events. Now do the same for the mouse
class.
Source Code DependenciesMicrosoft ATL LibrarySee AlsoSample ActiveX control where the Keyboard class is usedDownload Files
Written by Bjarke Viksoe. Article submitted 6/7/2001.
|
|||