Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MFC and Flash Active X control - mouse buttons

9 views
Skip to first unread message

Glen S. Rosen

unread,
Dec 30, 2009, 1:39:29 PM12/30/09
to
Hello everyone.

I have an VS2008/C++/MFC application that is quite simple. It is a
dialog based application that is border-less, sizes itself to the size
of the screen and plays a SWF file using the Flash ActiveX control.
Everything works as it should.

I would like to know if the user presses the left mouse button while
the SWF file is playing. There is no interaction - the SWF is showing
images. OnLButtonDown in the dialog doesn't receive the message so it
is being eaten up by the ActiveX control.

Is there a way for the ActiveX control to tell me that a mouse button
has been pressed?

Thanks,
Glen

David Ching

unread,
Dec 30, 2009, 9:20:03 PM12/30/09
to
"Glen S. Rosen" <njmed...@gmail.com> wrote in message
news:980b6160-0013-47fe...@z41g2000yqz.googlegroups.com...

> I would like to know if the user presses the left mouse button while
> the SWF file is playing. There is no interaction - the SWF is showing
> images. OnLButtonDown in the dialog doesn't receive the message so it
> is being eaten up by the ActiveX control.
>
> Is there a way for the ActiveX control to tell me that a mouse button
> has been pressed?
>

Yes, write a WH_MOUSE or WH_MOUSE_LL hook. I recommend the LL one because
that is called in the context of your thread meaning you don't need to put
your hook function in a DLL. Only hook your own process.

-- David

Glen S. Rosen

unread,
Dec 31, 2009, 7:57:14 PM12/31/09
to
On Dec 30, 9:20 pm, "David Ching" <d...@remove-this.dcsoft.com> wrote:
> "Glen S. Rosen" <njmedic2...@gmail.com> wrote in messagenews:980b6160-0013-47fe...@z41g2000yqz.googlegroups.com...

David,

Thank you for your response and pointing me in the right direction.
I'm not terribly familiar with hook procedures - I'm currently reading
up. Can you point me to a sample?

Thanks again,
Glen

David Ching

unread,
Jan 1, 2010, 5:49:18 PM1/1/10
to
"Glen S. Rosen" <njmed...@gmail.com> wrote in message
news:4b48d128-5402-4eb7...@r5g2000yqb.googlegroups.com...

> David,
>
> Thank you for your response and pointing me in the right direction.
> I'm not terribly familiar with hook procedures - I'm currently reading
> up. Can you point me to a sample?
>

I have some code available but it isn't exactly a sample. Have you gotten
to the part where you're calling SetWindowsHookEx() yet? Is your callback
function getting called?

-- David

0 new messages