触摸输入:即使禁用轻拂并按住,WM_LBUTTONDOWN也会延迟 [英] Touch input: WM_LBUTTONDOWN delayed even after disabling flicks and press-and-hold

查看:119
本文介绍了触摸输入:即使禁用轻拂并按住,WM_LBUTTONDOWN也会延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!

我正在开发一个简单的WIN32 API触摸应用程序.收到WM_LBUTTONDOWN消息的延迟使我的应用程序无响应.

I'm developing a touch application, plain WIN32 API. The delay in receiving the WM_LBUTTONDOWN message makes my app feel unresponsive.


我已经尝试通过设置MicrosoftTabletPenServiceProperty原子并响应WM_TABLET_QUERYSYSTEMGESTURESTATUS来尝试TABLET_DISABLE_PRESSANDHOLD和TABLET_DISABLE_FLICKS.它们绝对正常工作-轻弹和按住不放, 响应速度大大改善,但仍然不如直接使用WM_TOUCH那样敏感-仍然存在大约100毫秒或更长时间的延迟.


I've tried TABLET_DISABLE_PRESSANDHOLD and TABLET_DISABLE_FLICKS, both through setting the MicrosoftTabletPenServiceProperty atom and responding to WM_TABLET_QUERYSYSTEMGESTURESTATUS. They absolutely work properly -- flicks and press-and-hold get disabled, and responsiveness drastically improves, but it's still not as responsive as using WM_TOUCH directly -- there's still a delay of roughly 100ms or more.

 

直接使用WM_TOUCH(并通过GetMessageExtraInfo忽略WM_LBUTTONDOWN)确实可以接受,但是这使代码非常复杂-我担心兼容性.有没有更简单的方法来消除延迟?可能要设置一些其他标志吗? 延迟来自哪里?

Using WM_TOUCH directly (and ignoring WM_LBUTTONDOWN by way of GetMessageExtraInfo) does work acceptably, but this makes the code pretty complicated -- I worry about compatibility. Is there an easier way get rid of the delay? Some other flags to set, perhaps? Where's the delay coming from?

 

 

 

 

 提前致意,并致以最诚挚的问候

 Thanks in advance, and best regards

 

 

///莱夫(Leif)

///Leif

 

 

 

 

推荐答案

WM_TOUCH确实可行,但这是 非常的一种复杂的解决方法,而且我无法想象我是唯一遇到此问题的人.我看到有一些来自Microsoft的人,不胜感激您的两美分.

WM_TOUCH does work, but it was a very complicated workaround, and I can't imagine I'm the only one having this issue. I see there's a few people around from Microsoft, would much appreciate your two cents.


这篇关于触摸输入:即使禁用轻拂并按住,WM_LBUTTONDOWN也会延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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