将鼠标事件注入Flash应用程序. [英] Injecting mouse events into a flash application.

查看:70
本文介绍了将鼠标事件注入Flash应用程序.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在将鼠标事件注入Flash应用程序(以C#形式和activeX控件托管)时遇到问题.我使用:: PostMessage和WM_LBUTTONDOWN和WM_LBUTTONUP事件注入事件.如果我将鼠标悬停在Flash应用程序上(我不需要单击它,只需悬停),则注入工作正常;如果我不悬停窗口,则它们不起作用.

我模仿了所有事件的发布,并使用普通的鼠标输入将其发送到窗口,并且此方法以前可以很好地注入到firefox中.知道为什么Flash坚持要让鼠标悬停在窗口上吗?并考虑到该Flash应用程序将始终处于后台,是否有可能的解决方案?

旁注:万一有人担心,这是一款合法软件,我将Flash和pdf对象渲染到DirectX上下文中以显示为材料,该项目本质上是一个光荣的Windows资源管理器.

Hi all,

I''m having a problem injecting mouse events into a flash application (hosted in a c# form and activeX control). I''m injecting the events using ::PostMessage with WM_LBUTTONDOWN and WM_LBUTTONUP events. If I hover my mouse over the flash application (I don''t need to click on it, just hover) the injects work, if I don''t hover the window, they don''t.

I''ve mimicked all the events being posted and sent to the window with normal mouse input, and this method has previously worked fine injecting into firefox. Any idea''s why flash is insisting on having the mouse hover the window? and given that this flash application will ALWAYS be in the background, are there any possible solutions?

Side Note: In case anyone is worried, this is for a legitimate piece of software, I''m rendering flash and pdf objects into a DirectX context for display as materials, the project is essentially a glorified windows explorer.

推荐答案

已成功解决该问题.是因为我的输入设备是多点触摸屏.我在WM_LBUTTONDOWN/UP事件之前注入了WM_MOUSEMOVE和WM_SETCURSOR事件,这解决了该问题,基本上是在Flash应用程序中伪装了鼠标.
Managed to solve the problem (so far). Was caused by my input device being a Multi-touch screen. I injected a WM_MOUSEMOVE and a WM_SETCURSOR event before the WM_LBUTTONDOWN / UP events and this fixed the problem, basically faking mouse movement in the flash app.


这篇关于将鼠标事件注入Flash应用程序.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆