1. <tfoot id='grVDi'></tfoot>
      • <bdo id='grVDi'></bdo><ul id='grVDi'></ul>
      <legend id='grVDi'><style id='grVDi'><dir id='grVDi'><q id='grVDi'></q></dir></style></legend>
    1. <small id='grVDi'></small><noframes id='grVDi'>

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

    2. 在 Windows 设备的屏幕上捕获触摸输入

      时间:2023-09-14

        <bdo id='UZlQr'></bdo><ul id='UZlQr'></ul>

        1. <small id='UZlQr'></small><noframes id='UZlQr'>

                <tbody id='UZlQr'></tbody>
              <legend id='UZlQr'><style id='UZlQr'><dir id='UZlQr'><q id='UZlQr'></q></dir></style></legend><tfoot id='UZlQr'></tfoot>
              <i id='UZlQr'><tr id='UZlQr'><dt id='UZlQr'><q id='UZlQr'><span id='UZlQr'><b id='UZlQr'><form id='UZlQr'><ins id='UZlQr'></ins><ul id='UZlQr'></ul><sub id='UZlQr'></sub></form><legend id='UZlQr'></legend><bdo id='UZlQr'><pre id='UZlQr'><center id='UZlQr'></center></pre></bdo></b><th id='UZlQr'></th></span></q></dt></tr></i><div id='UZlQr'><tfoot id='UZlQr'></tfoot><dl id='UZlQr'><fieldset id='UZlQr'></fieldset></dl></div>
                本文介绍了在 Windows 设备的屏幕上捕获触摸输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                有没有办法在 windows 设备的屏幕上(应用程序框架外)捕获触摸输入?

                Is there any way to capture touch input on the screen (outside application frame) in windows device?

                我正在开发 WPF 应用程序,如果触摸输入仅出现在应用程序框架内,我可以检索它.另外,有没有办法在应用最小化的情况下注册触摸输入?

                I'm working on a WPF application and can retrieve the touch input if it only occurs within the application frame. Also, is there a way to register the touch input even when the application is minimized?

                推荐答案

                WPF 框架没有内置方法可以让您在应用程序之外侦听输入.如果你想这样做,你必须进入 p/invoke 领域.

                There's no built-in method of the WPF framework that lets you listen for input outside of the application. If you want to do that, you'll have to get into p/invoke territory.

                具体来说,您需要创建一个 hook.您需要查看 SetWindowsHookEx 方法和 WH_MOUSEWH_MOUSE_LL 钩子.

                Specifically you'll need to create a hook. You'll want to look at the SetWindowsHookEx method and either the WH_MOUSE or WH_MOUSE_LL hooks.

                由于您正在处理触摸输入,此答案可能对您有一些有用的信息:

                Since you're dealing with touch inputs, this answer might have some useful information for you:

                hookProc 回调的 lParam 参数是一个指向 MSLLHOOKSTRUCT.它包含一个 very 记录不佳的 dwExtraInfo 变量,它告诉您它是否是通过触摸生成的.

                The lParam argument of your hookProc callback is a pointer to an MSLLHOOKSTRUCT. It contains a very poorly documented dwExtraInfo variable, which tells you whether it was generated from a touch.

                如果 0xFF515700 中的所有位都在 dwExtraInfo 中设置,则调用回调以响应触摸.

                If all of the bits in 0xFF515700 are set in dwExtraInfo, then the callback was invoked in response to a touch.

                这篇关于在 Windows 设备的屏幕上捕获触摸输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何使 EntranceThemeTransition 在自定义面板上工作项目来源? 下一篇:DirectShow Virtual Camera 未出现在某些配置的列表中

                相关文章

                  <bdo id='rjyC2'></bdo><ul id='rjyC2'></ul>
              1. <small id='rjyC2'></small><noframes id='rjyC2'>

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

                  <tfoot id='rjyC2'></tfoot>