Link to home
Start Free TrialLog in
Avatar of whfolsom4
whfolsom4

asked on

Adding an Event to ActiveX control created from DLL

I need to know how to add an Event to an ActiveX control I imported from a type library (DLL).  As I received it, the control works fine but only fires a few Drag Events, OnEnter and OnExit.  Before posting here I searched on the forums, but all the answers I could find assume I am creating an ActiveX control or Active Form from scratch, but I am using a DLL compiled in C++ that does not fire the events I want.  I need to be able to track the mouse position inside this control.  An example of how to add OnClick or Mousedown to such an ActiveX control would be very helpful.

Also any other workaround to track mouse position and clicks inside an ActiveX container would be sufficient.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Wim ten Brink
Wim ten Brink
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of whfolsom4
whfolsom4

ASKER

Thanks, I did end up installing a mousehook message handler in the form of TApplicationEvents component.  Otherwise, it looks like the parent control receives no events when the mouse if over the ActiveX control.