<tfoot id='e3JAN'></tfoot>
      <bdo id='e3JAN'></bdo><ul id='e3JAN'></ul>
  • <i id='e3JAN'><tr id='e3JAN'><dt id='e3JAN'><q id='e3JAN'><span id='e3JAN'><b id='e3JAN'><form id='e3JAN'><ins id='e3JAN'></ins><ul id='e3JAN'></ul><sub id='e3JAN'></sub></form><legend id='e3JAN'></legend><bdo id='e3JAN'><pre id='e3JAN'><center id='e3JAN'></center></pre></bdo></b><th id='e3JAN'></th></span></q></dt></tr></i><div id='e3JAN'><tfoot id='e3JAN'></tfoot><dl id='e3JAN'><fieldset id='e3JAN'></fieldset></dl></div>
  • <legend id='e3JAN'><style id='e3JAN'><dir id='e3JAN'><q id='e3JAN'></q></dir></style></legend>

        <small id='e3JAN'></small><noframes id='e3JAN'>

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

        Is there a way to simulate touch events in Windows 8(有没有办法在 Windows 8 中模拟触摸事件)
        <i id='zMRER'><tr id='zMRER'><dt id='zMRER'><q id='zMRER'><span id='zMRER'><b id='zMRER'><form id='zMRER'><ins id='zMRER'></ins><ul id='zMRER'></ul><sub id='zMRER'></sub></form><legend id='zMRER'></legend><bdo id='zMRER'><pre id='zMRER'><center id='zMRER'></center></pre></bdo></b><th id='zMRER'></th></span></q></dt></tr></i><div id='zMRER'><tfoot id='zMRER'></tfoot><dl id='zMRER'><fieldset id='zMRER'></fieldset></dl></div>
          <bdo id='zMRER'></bdo><ul id='zMRER'></ul>

          <tfoot id='zMRER'></tfoot>
        • <small id='zMRER'></small><noframes id='zMRER'>

                <tbody id='zMRER'></tbody>
              <legend id='zMRER'><style id='zMRER'><dir id='zMRER'><q id='zMRER'></q></dir></style></legend>
                • 本文介绍了有没有办法在 Windows 8 中模拟触摸事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

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

                  Is there a way to simulate touch events in Windows 8 (and preferably in windows 7).
                  I know there is a project called Multi touch vista but I feel its a bit overkill and I never got it working correctly with multiple screens.
                  What I want to do is very simple, I want to start an app that can send touch events to Windows no need for multiple mice or any thing like that.
                  Can it be done or do I need a (MMV) driver to do that?

                  谢谢
                  /吉米

                  推荐答案

                  我正在寻找类似的东西,发现这篇文章 使用触控注入 API 在 Windows 开发者预览版中模拟触控输入示例代码 (C++) 可能会回答您的问题.但是,这似乎只适用于 Windows 8(而不是 Windows 7).

                  I was looking for something similar and found this article Simulating Touch Input in Windows Developer preview using Touch Injection API and sample code (C++) may answer your question. However, this seems to work only on Windows 8 (not Windows 7).

                  它模拟点击、按住、拖动、捏/平移、旋转和横向滑动.

                  It simulates Tap, Hold, Drag, Pinch/Pan, Rotate and Cross-Slide.

                  这是触摸(Tap)代码:

                  Here is the touch (Tap) code:

                  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 触控手势入门

                  这篇关于有没有办法在 Windows 8 中模拟触摸事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Adding and removing users from Active Directory groups in .NET(在 .NET 中的 Active Directory 组中添加和删除用户)
                  set equality in linq(在 linq 中设置相等)
                  HashSet conversion to List(HashSet 转换为 List)
                  How to set timeout for webBrowser navigate event(如何为 webBrowser 导航事件设置超时)
                  Test whether two IEnumerablelt;Tgt; have the same values with the same frequencies(测试两个IEnumerablelt;Tgt;具有相同频率的相同值)
                  How do you determine if two HashSets are equal (by value, not by reference)?(您如何确定两个 HashSet 是否相等(按值,而不是按引用)?)

                          <bdo id='Ixlnd'></bdo><ul id='Ixlnd'></ul>
                          <i id='Ixlnd'><tr id='Ixlnd'><dt id='Ixlnd'><q id='Ixlnd'><span id='Ixlnd'><b id='Ixlnd'><form id='Ixlnd'><ins id='Ixlnd'></ins><ul id='Ixlnd'></ul><sub id='Ixlnd'></sub></form><legend id='Ixlnd'></legend><bdo id='Ixlnd'><pre id='Ixlnd'><center id='Ixlnd'></center></pre></bdo></b><th id='Ixlnd'></th></span></q></dt></tr></i><div id='Ixlnd'><tfoot id='Ixlnd'></tfoot><dl id='Ixlnd'><fieldset id='Ixlnd'></fieldset></dl></div>
                        • <tfoot id='Ixlnd'></tfoot>

                          <small id='Ixlnd'></small><noframes id='Ixlnd'>

                            <tbody id='Ixlnd'></tbody>
                            <legend id='Ixlnd'><style id='Ixlnd'><dir id='Ixlnd'><q id='Ixlnd'></q></dir></style></legend>