有没有办法在Windows 8中模拟触摸事件

有没有办法在Windows 8中模拟触摸事件(最好是在Windows 7中)。
我知道有一个名为Multi touch vista的项目,但我觉得它有点矫枉过正,我从来没有让它在多个屏幕上正常工作。
我想要做的很简单,我想启动一个可以向Windows发送触摸事件的应用程序,不需要多个鼠标或任何类似的东西。
它可以完成还是我需要一个(MMV)驱动程序来做到这一点?

谢谢
/麦

我正在寻找类似的东西,发现这篇文章使用Touch Injection API和示例代码 (C ++) 在Windows Developer预览中模拟触摸输入可能会回答您的问题。 但是,这似乎仅适用于Windows 8(不是Windows 7)。

它模拟点击,保持,拖动,捏/平移,旋转和交叉滑动。

这是触摸(Tap)代码:

POINTER_TOUCH_INFO contact; InitializeTouchInjection(1, TOUCH_FEEDBACK_DEFAULT); // Here number of contact point is declared as 1. memset(&contact, 0, sizeof(POINTER_TOUCH_INFO)); contact.pointerInfo.pointerType = PT_TOUCH; contact.pointerInfo.pointerId = 0; //contact 0 contact.pointerInfo.ptPixelLocation.y = 200; // Y co-ordinate of touch on screen contact.pointerInfo.ptPixelLocation.x = 300; // X co-ordinate of touch on screen contact.touchFlags = TOUCH_FLAG_NONE; contact.touchMask = TOUCH_MASK_CONTACTAREA | TOUCH_MASK_ORIENTATION | TOUCH_MASK_PRESSURE; contact.orientation = 90; // Orientation of 90 means touching perpendicular to screen. contact.pressure = 32000; // defining contact area (I have taken area of 4 x 4 pixel) contact.rcContact.top = contact.pointerInfo.ptPixelLocation.y - 2; contact.rcContact.bottom = contact.pointerInfo.ptPixelLocation.y + 2; contact.rcContact.left = contact.pointerInfo.ptPixelLocation.x - 2; contact.rcContact.right = contact.pointerInfo.ptPixelLocation.x + 2; contact.pointerInfo.pointerFlags = POINTER_FLAG_DOWN | POINTER_FLAG_INRANGE | POINTER_FLAG_INCONTACT; InjectTouchInput(1, &contact); // Injecting the touch down on screen contact.pointerInfo.pointerFlags = POINTER_FLAG_UP; InjectTouchInput(1, &contact); // Injecting the touch Up from screen 

另一篇文章: Windows Touch手势入门

我没有机会亲自尝试,但根据这篇文章 ,Windows 8 Dev Preview附带的模拟器允许使用鼠标模拟多点触摸缩放和旋转手势。

您可以在此BUILD会议的大约35:40看到此演示: 用于构建Metro风格应用的工具

除了针对InjectTouchInput的C ++示例代码的解决方案之外,它还包含在Windows 8的User32.dll中,可以在此处找到C#解决方案:

InjectTouchInput Windows 8 C#无法正常工作(返回false)

创建虚拟Hid驱动程序似乎是唯一的方法。