Hi all,
[Background]I have a standalone c# application that renders flash and pdf's via activeX controls. But they're actually rendered into a 3d directx environment., and events are then injected into the form via windows messaging system (WM_MOUSE events). However, I need to filter out some of the random windows messages which are being generated by using this method.
[The Question]Is there a way to capture Windows Message events that are being passed to an activeX control? I'm overriding the forms WndProc to capture the events being sent to the form, but WM_MOUSELEAVE for example, still fires in the activex controls window. Its these I'm trying to prevent.
Cheers in advance for any help.
Loading
Sam HobbsPosted Oct 19, 2010, 6:17 PM
Wayne SmithPosted Oct 19, 2010, 6:10 PM
Im trying to capture the messages sent to an ActiveX control by Windows via the windows message queue. Specifically, I'm wanting to intercept the WM_MOUSELEAVE and 0xC272. I've overloaded WndProc on my c# form and from there I'm intercepting a few other messages, but this only receives WM_NCMOUSELEAVE -- intercepting this doesn't prevent the ActiveX control from getting WM_MOUSELEAVE. These messages are being sent from an external c++ / DirectX application, its because of this that the WM_MOUSELEAVE event needs to be intercepted, its getting sent to the ActiveX control after every injected message (sent by windows, not me) and this causes issues with interaction.
It occured to me just now, that the ActiveX control is actually a window itself, so I'm now looking into using the window handle to process its message queue directly, but Im as of yet unsure how to do this.
Unfortunately I have no access to the ActiveX controls source code, its the Adobe Flash ActiveX control.
Sam HobbsPosted Oct 19, 2010, 5:28 PM
I am not sure I understand what you are asking, but probably you need to subclass the ActiveX control. It is relatively simple to do using .Net; look for samples and articles about that. You will find many articles about it using unmanaged (not .Net) code but there are also articles and samples about it using .Net.