- 15
- 0
- 约9.4千字
- 约 8页
- 2018-07-09 发布于江苏
- 举报
各种钩子类型对应的值
各种钩子类型对应的值
Hooks WH_MOUSE_LL and WH_KEYBOARD_LL are system wide, but WH_MOUSE and WH_KEYBOARD are application wide. You need just to replace first ones with another everywhere apropriatly. Constant declarations are:
public const int WH_MOUSE_LL = 14; //global mouse hook constant public const int WH_KEYBOARD_LL = 13; //global keyboard hook constant public const int WH_MOUSE = 7; //mouse hook constant public const int WH_KEYBOARD = 2; //keyboard hook constant
I remember something like that was already discussed here, so if you need more info you can alo dig there. Let me know if it works !
/*
* SetWindowsHook() codes
*/
#define WH_MIN (-1)
#define WH_MSGFILTER (-1)
#define WH_JOURNALRECORD 0
#define WH_JOURNALPLAYBACK 1
#define WH_KEYBOARD 2
#define WH_GETMESSAGE 3
#define WH_CALLWNDPROC 4
#define WH_CBT 5
#define WH_SYSMSGFILTER 6
#define WH_MOUSE 7
#if defined(_WIN32_WINDOWS)
#define WH_HARDWARE 8
#endif
#define WH_DEBUG 9
#define WH_SHELL 10
#define WH_FOREGROUNDIDLE 11
#if(WINVER = 0x0400)
#define WH_CALLWNDPROCRET 12
#endif /* WINVER = 0x0400 */
#if (_WIN32_WINNT = 0x0400)
#define WH_KEYBOARD_LL 13
#define WH_MOUSE_LL 14
#endif // (_WIN32_WINNT = 0x0400)
#if(WINVER = 0x0400)
#if (_WIN32_WINNT = 0x0400)
#define WH_MAX 14
#else
#define WH_MAX 12
#endif // (_WIN32_WINNT = 0x0400)
#else
#define WH_MAX 11
#endif
#define WH_MINHOOK WH_MIN
#define WH_MAXHOOK WH_MAX
#define WM_KEYFIRST 0x0100
#define WM_KEYDOWN 0x0100
#define WM_KEYUP 0x0101
#define WM_CHAR 0x0102
#define WM_DEADCHAR 0x0103
#define WM_SYSKEYDOWN 0x0104
#define WM_SYSKEYUP 0x0105
#define WM_SYSCHAR 0x0106
#define WM_SYSDEADCHAR 0x0107
#if(_WIN32_WINNT
原创力文档

文档评论(0)