Seems like Bindind EVT_KEY_DOWN in a FlashWindow doesn’t work, is there a way to handle keyevents in FlashWindow?
The ActiveX container is implemented with some additional native windows inside the wx window. You can see this in activex.py where it is using the native APIs via ctypes to create a window of the "AtlAxWin" type. Using a tool like Spy++ shows that there is another window that is a child of the AtlAxWin for the actual ActiveX flash player.
You might be able to intercept native key events using the AtlAxWin window handle created in ActiveXCtrl.__init__, but since there is another child below that then it is not likely that it is receiving them either. Or you could try overriding the MSWTranslateMessage method. See activex.py for an example of how it is used.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Thanks for the help; I made it works by overriding MSWTranslateMessage (it
looks like pyHook).
And I made a workaround to get the shockwave control's hwnd so I could send
directly keystrokes to it :).
[mailto:wxpython-users-bounces@lists.wxwidgets.org] On Behalf Of Robin Dunn
···
-----Original Message-----
From: wxpython-users-bounces@lists.wxwidgets.org
Sent: venerdì 1 agosto 2008 20.38
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] wx.lib.flashwin keyevents handling
(EVT_KEY_DOWN,etc.)
Ferraro Luciano wrote:
Seems like Bindind EVT_KEY_DOWN in a FlashWindow doesnt work, is there
a way to handle keyevents in FlashWindow?
The ActiveX container is implemented with some additional native windows
inside the wx window. You can see this in activex.py where it is using
the native APIs via ctypes to create a window of the "AtlAxWin" type.
Using a tool like Spy++ shows that there is another window that is a
child of the AtlAxWin for the actual ActiveX flash player.
You might be able to intercept native key events using the AtlAxWin
window handle created in ActiveXCtrl.__init__, but since there is
another child below that then it is not likely that it is receiving them
either. Or you could try overriding the MSWTranslateMessage method.
See activex.py for an example of how it is used.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!