c++ win32 get system volume accelerator
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.
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.
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.
see this post... http://www.rohitab.com/discuss/topic/21252-change-volume/
精彩评论