Solved

Adding an Event to ActiveX control created from DLL

Posted on 2004-10-04
2
166 Views
Last Modified: 2010-04-05
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!
0
Comment
Question by:whfolsom4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 125 total points
ID: 12225281
If it doesn't fire the events you want, then you're out of luck. It's the C++ code that will have to shoot those events in the first place. If it doesn't, well... Tough!

To track the mouse events, you might use the OnMouseMove events of the control below the ActiveX control. If not, you'll have to install a mousehook message handler. Not a pretty solution, though.
0
 

Author Comment

by:whfolsom4
ID: 12227094
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.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question