“默认缩放级别"鼠标按键 [英] The "Default Zoom Level" Mouse Button

查看:95
本文介绍了“默认缩放级别"鼠标按键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多鼠标和键盘上都带有缩放"按钮.这些几乎总是生成Ctrl + Mouse Wheel消息给应用程序,因此我们的程序员很容易解决它们.

Many mice and keyboards have "zoom" buttons on them. These almost always generate Ctrl+Mouse Wheel messages to the applications, so they are easily accounted for by us programmers.

但是我当前的Logitech鼠标还有其他功能.缩放轮确实会在滚动(或实际上是倾斜)时发送Ctrl +鼠标轮消息,但是当我按下缩放轮时,大多数程序会将缩放级别恢复为默认值,即100%.在这种情况下,鼠标会向应用程序发送什么样的消息?我找不到适合的虚拟密钥代码它.

But my current Logitech mouse has an additional feature. The zoom wheel indeed sends Ctrl+Mouse Wheel messages when scrolled (or, actually, tilted), but when I depress the zoom wheel, most programs restore the zoom level to the default, i.e. 100 %. What kind of message does the mouse send to the application in this case? I cannot find a suitable virtual key code for it.

我可能应该说我已尝试捕获此事件.在我的Delphi应用程序中,我为KeyDownMouseDownMouseWheel事件编写了处理程序,但其中的任何一个都不是由这个神秘按钮触发的.

I should probably say that I have tried to capture this event. In my Delphi application, I wrote handlers for the KeyDown, MouseDown, and MouseWheel events, but non of them are triggered by this mysterious button.

支持此按钮的应用程序:

Applications that support this button:

  • Google Chrome 5.0.375.127
  • Microsoft Word 2010

似乎不支持此按钮的应用程序:

Applications that seem not to support this button:

  • Windows 7中的Microsoft写字板
  • Windows 7中的Microsoft Paint

推荐答案

没有专用的快捷键或Windows消息.鼠标帮助程序对具有焦点的过程有特定的了解,这很不错.并生成该程序重置缩放所需的特定命令,可能是WM_COMMAND消息.使用Microsoft的Spy ++之类的工具查看生成的消息(如果有).

There is no dedicated shortcut key-stroke or Windows message. Odds are pretty good that the mouse helper has specific awareness of the process that has the focus. And generates the specific command that this program needs to reset the zoom, possibly a WM_COMMAND message. Use a tool like Microsoft's Spy++ to see what messages are generated, if any.

这篇关于“默认缩放级别"鼠标按键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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