模拟WM_TOUCH [英] Simulate WM_TOUCH

查看:135
本文介绍了模拟WM_TOUCH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在开发一个多点触控设备,现在我正在尝试让它在Windows 7上运行。我的想法是使用SendMessage发送消息WM_TOUCH ()具有正确的参数。我有戴尔Latitude工作,我能够捕获戴尔生成的WM_TOUCH消息。我想获取LParam指向的原始数据,但我只能获得AccessViolation异常。我正在使用Message.GetLParam(类型)。我尝试了不同的编组方式但结果是一样的。您对如何获取此数据有任何想法吗? 我不需要TOUCHINPUT结构,GetTouchInputInfo()会产生结果。我想知道LParam指向的结构是什么,并且在worder中的GetTouchInputInfo()进程返回TOUCHINPUT结构。我们的想法是能够模拟触摸事件,而不是处理它们,因此我需要GetTouchInputInfo()使用的数据的语法。
提前感谢! :)

解决方案

WM_TOUCH的引用在这里 http://msdn.microsoft.com/en-us/library/dd317341(VS.85)的.aspx

LPARAM是触摸输入消息(HTOUCHINPUT)的句柄,WPARAM包含有关输入数量的信息。

如果您正在模拟WM_TOUCH,您可能只想填充TOUCHINPUT结构而不是尝试重新创建GetTouchInputInfo。可能更容易的是调查多点触控"Multi-touch Vista"所做的工作。项目 http://multitouchvista.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28979

Hi guys,
I am developing a multitouch device and now I am trying to make it work on Windows 7. My idea is to send messages WM_TOUCH using SendMessage() with the correct parameters. I have a working Dell Latitude and I am able to catch WM_TOUCH messages generated by the Dell. I want to get the raw data which LParam is pointing to, but I can only get AccessViolation exception. I am using Message.GetLParam(type). I tried diferent ways with marshalling but the result is the same. Do you have any ideas how to get this data ?
I do not need the TOUCHINPUT structs, which GetTouchInputInfo() yields out. I want to find out what is the struct that LParam points to, and GetTouchInputInfo() processes in worder to return the TOUCHINPUT structs. The idea is to be able to simulate touch events, not to process them, therefore I need the syntaxis of the data which GetTouchInputInfo() works with.
Thanks in advance! :)

解决方案

The reference for WM_TOUCH is here http://msdn.microsoft.com/en-us/library/dd317341(VS.85).aspx

The LPARAM is a handle to a touch input message (HTOUCHINPUT) and the WPARAM contains information about the number of inputs.

If you're simulating WM_TOUCH, you might just want to populate TOUCHINPUT structs rather than try to recreate GetTouchInputInfo.   What might be even easier would be to look into the work done for the multitouch "Multi-touch Vista" project http://multitouchvista.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28979.


这篇关于模拟WM_TOUCH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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