c++ win32 获取系统音量加速器
是否可以使用 C++ 检测 win32 中哪些键用于系统音量加速器?例如:如果用户按 fn + 键向上(这也是更改系统音量的组合键),我想检测此事件并对其做出响应。
is it possible to detect which keys are used for a system volume accelerator in win32 using c++? For example: if the user presses fn + key up (and this is also the key combination to change the system volume), i would like to detect this event and response to it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是由机器的 BIOS 处理的。它产生击键、VK_VOLUME_DOWN 或 VK_VOLUME_UP 虚拟键。 DefWindowProc 处理该 WM_KEYDOWN 消息会产生 WM_APPCOMMAND、APPCOMMAND_VOLUME_UP/DOWN。 DefWindowProc 对该消息的处理会调整音量。
This is handled by the machine's BIOS. It produces a keystroke, VK_VOLUME_DOWN or VK_VOLUME_UP virtual key. DefWindowProc handling of that WM_KEYDOWN message produces WM_APPCOMMAND, APPCOMMAND_VOLUME_UP/DOWN. DefWindowProc handling of that message adjusts the volume.
我认为这一般是不可能的。 fn 键通常由 BIOS-SMM-ACPI 处理,用户程序无法访问。
也许,如果它被翻译成标准的多媒体音量增大键,你就可以得到这个,但我不会打赌。
I don't think this is possible generally. The fn-keys are usually handled by the BIOS-SMM-ACPI whatever, and that is not accesible to user programs.
Maybe, if it were translated to the standard multimedia volume-up key, you could get that, but I wouldn't bet on it.
看到这个帖子...
http://www.rohitab.com/discuss/topic/21252-change-音量/
see this post...
http://www.rohitab.com/discuss/topic/21252-change-volume/