为什么用Hotkey控件获的的Hotkey写入快捷方式以后就不正确了?(50分)

  • 主题发起人 主题发起人 netCobra
  • 开始时间 开始时间
N

netCobra

Unregistered / Unconfirmed
GUEST, unregistred user!
我用Hotkey控件获得指定的Hotkey然后在创建快捷方式的时候写入快捷方式的热键,但是发现最后写进快捷方式的热键和实际的不一致,全部都把Ctrl、Alt、Shift丢了,比如我指定热键为Ctrl+D,最后保存的却是D,结果我都没办法输入D了[:D]

我的快捷方式是用IShellLink方法创建的,在创建过程中热键作为一个Word型的参数传递进去,是Word型的参数用的不对吗?

请问哪位富翁知道这是怎么回事?谢谢了!!!
 
WM_GETHOTKEY
An application sends a WM_GETHOTKEY message to determine the hot key associated with a window.

WM_GETHOTKEY
wParam = 0; // not used; must be zero
lParam = 0; // not used; must be zero

Parameters
This message has no parameters.

Return Values
The return value is the virtual-key code and modifiers for the hot key, or NULL if no hot key is associated with the window. The virtual-key code is in the low byte of the return value and the modifiers are in the high byte. The modifiers can be a combination of the following flags.

Value Meaning
HOTKEYF_ALT ALT key
HOTKEYF_CONTROL CTRL key
HOTKEYF_EXT Extended key
HOTKEYF_SHIFT SHIFT key


Remarks
These hot keys are unrelated to the hot keys set by the RegisterHotKey function.

 
接受答案了.
 
to netcobra:

可以给我一个比较简单的做热键的例子吗?
 
后退
顶部