<tfoot id='vvDXO'></tfoot>

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

    <legend id='vvDXO'><style id='vvDXO'><dir id='vvDXO'><q id='vvDXO'></q></dir></style></legend>

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

      1. 从每个窗口获取 WM_TOUCH 消息并在我的 APP 中处理

        时间:2023-10-24
        • <bdo id='oKTJJ'></bdo><ul id='oKTJJ'></ul>
            <tbody id='oKTJJ'></tbody>
          <i id='oKTJJ'><tr id='oKTJJ'><dt id='oKTJJ'><q id='oKTJJ'><span id='oKTJJ'><b id='oKTJJ'><form id='oKTJJ'><ins id='oKTJJ'></ins><ul id='oKTJJ'></ul><sub id='oKTJJ'></sub></form><legend id='oKTJJ'></legend><bdo id='oKTJJ'><pre id='oKTJJ'><center id='oKTJJ'></center></pre></bdo></b><th id='oKTJJ'></th></span></q></dt></tr></i><div id='oKTJJ'><tfoot id='oKTJJ'></tfoot><dl id='oKTJJ'><fieldset id='oKTJJ'></fieldset></dl></div>

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

            <tfoot id='oKTJJ'></tfoot>

            1. <legend id='oKTJJ'><style id='oKTJJ'><dir id='oKTJJ'><q id='oKTJJ'></q></dir></style></legend>
                • 本文介绍了从每个窗口获取 WM_TOUCH 消息并在我的 APP 中处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发触摸屏应用程序.该应用程序的目标是当最终用户要在具有 Windows7 的触摸屏设备上的屏幕上进行垂直触摸移动(用手指画一条垂直线)时,所有活动窗口都需要最小化(类似于显示桌面).我的问题是如何处理在桌面上活动的每个窗口中随处发生的所有 WM_TOUCH 消息.没有可以用来接收所有 WM_TOUCH 消息的 Windows 挂钩.我尝试使用 WH_GETMESSAGE 希望我可以提取 WM_TOUCH 消息但不起作用,我尝试使用 WH_MOUSE_LL 并获得所有鼠标事件.有一个函数 GetMessageExtraInfo ,我可以使用此代码从何处启动鼠标消息:

                  I am developing touchscreen application. The goal of the application is when the end user is going to make vertical touch movement (a vertical line with his finger)on the screen on touchscreen device with Windows7 all of the active windows need to minimize (something like show desktop). My question is how can i process all the WM_TOUCH messages that happen everywhere in every window that is active on the desktop. There is no windows hook with which i can take all the WM_TOUCH messages. I tried to use the WH_GETMESSAGE with hope that i can extract the WM_TOUCH messages but is not working, I tried to use the WH_MOUSE_LL and got all the mouse events. There is function GetMessageExtraInfo with which i can see from where the mouse messages is initiated with this code:

                  如果 ((GetMessageExtraInfo().ToInt32() & MOUSEEVENTF_FROMTOUCH) == 0xFF515700){textBoxLog.AppendText("asdada");}如果这是真的,那么消息由 TouchScreen 设备启动.这仅适用于从我的应用程序(我的应用程序活动窗口)发送的消息,但不适用于我从应用程序窗口外的其他窗口获取的鼠标消息.我正在研究这个主题一段时间,但我仍然无法得到任何答案.因此,如果有人知道如何将所有 WM_TOUCH 消息发送到我的应用程序,请回复.

                  if ((GetMessageExtraInfo().ToInt32() & MOUSEEVENTF_FROMTOUCH) == 0xFF515700) { textBoxLog.AppendText("asdada"); } if this is true then the message is initiated by TouchScreen device. This works only with the messages that are sent from my app(my app active window), but not with the mouse messages i am getting from the other windows outside my app window. I am researching this subject for a while and i still can't get any answer. So please if someone knows any way how can i get all the WM_TOUCH messages to my app please respond.

                  米哈伊尔

                  推荐答案

                  你必须 hook 全局消息 proc.这样,您是第一个收到所有消息的人.您这样做的方式将不起作用,因为您的 wndproc 仅在您的窗口处于活动状态时才活动".

                  You must hook the global message proc. This way you are the first to get at all the messages. The way you are doing this will not work because your wndproc is only "active" when your windows is active.

                  只需创建一个新的 wndproc,它只处理您希望成为全局的消息,并根据您想要的逻辑允许它们通过或切断它们.

                  Simply create a new wndproc that processes only the messages you want to be global and either allowing them to pass through or cutting them off depending on the logic you want.

                  http://msdn.microsoft.com/en-us/library/ms644990%28v=vs.85%29.aspx

                  这篇关于从每个窗口获取 WM_TOUCH 消息并在我的 APP 中处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何创建在任务管理器或服务列表中不可见的进程 下一篇:是否可以在自己的应用程序中使用 Windows 7 任务调度程序

                  相关文章

                  <tfoot id='kAMMk'></tfoot>

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

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

                      <legend id='kAMMk'><style id='kAMMk'><dir id='kAMMk'><q id='kAMMk'></q></dir></style></legend>
                        <bdo id='kAMMk'></bdo><ul id='kAMMk'></ul>