Parameters nCode Specifies a code the hook procedure uses to determine how to process the message. This parameter can be one of the following values: Value Meaning HC_ACTION The wParam and lParam parameters contain information about a mouse message. HC_NOREMOVE The wParam and lParam parameters contain information about a mouse message, and the mouse message has not been removed from the message queue. (An application called the PeekMessage function, specifying the PM_NOREMOVE flag.) LRESULT CALLBACK KeyboardProc( int code, // hook code WPARAM wParam, // virtual-key code LPARAM lParam // keystroke-message information );
Parameters code Specifies a code the hook procedure uses to determine how to process the message. This parameter can be one of the following values: Value Meaning HC_ACTION The wParam and lParam parameters contain information about a keystroke message. HC_NOREMOVE The wParam and lParam parameters contain information about a keystroke message, and the keystroke message has not been removed from the message queue. (An application called the PeekMessage function, specifying the PM_NOREMOVE flag.) If code is less than zero, the hook procedure must pass the message to the CallNextHookEx function without further processing and should return the value returned by CallNextHookEx.
调用func(0);表示一个Action
func(1);表示获取下一个
func(2);表示忽略……
里面
……
/*
* Hook Codes
*/
#define HC_ACTION 0
#define HC_GETNEXT 1
#define HC_SKIP 2
#define HC_NOREMOVE 3
#define HC_NOREM HC_NOREMOVE
#define HC_SYSMODALON 4
#define HC_SYSMODALOFF 5
……
int nCode, // hook code
WPARAM wParam, // message identifier
LPARAM lParam // mouse coordinates
);
Parameters
nCode
Specifies a code the hook procedure uses to determine how to process the message. This parameter can be one of the following values: Value Meaning
HC_ACTION The wParam and lParam parameters contain information about a mouse message.
HC_NOREMOVE The wParam and lParam parameters contain information about a mouse message, and the mouse message has not been removed from the message queue. (An application called the PeekMessage function, specifying the PM_NOREMOVE flag.)
LRESULT CALLBACK KeyboardProc(
int code, // hook code
WPARAM wParam, // virtual-key code
LPARAM lParam // keystroke-message information
);
Parameters
code
Specifies a code the hook procedure uses to determine how to process the message. This parameter can be one of the following values: Value Meaning
HC_ACTION The wParam and lParam parameters contain information about a keystroke message.
HC_NOREMOVE The wParam and lParam parameters contain information about a keystroke message, and the keystroke message has not been removed from the message queue. (An application called the PeekMessage function, specifying the PM_NOREMOVE flag.)
If code is less than zero, the hook procedure must pass the message to the CallNextHookEx function without further processing and should return the value returned by CallNextHookEx.
HC_GETNEXT 1
HC_SKIP 2
HC_NOREMOVE 3
HC_NOREM HC_NOREMOVE
HC_SYSMODALON 4
HC_SYSMODALOFF 5
这些的中文意思是什么啊!拜托了各位
get 获取
next 下一个
no 不,没有
remove 移除
sys 系统
modal 模式
on 开启
off 关闭