关于钩子(50分)

  • 主题发起人 主题发起人 jonjon
  • 开始时间 开始时间
J

jonjon

Unregistered / Unconfirmed
GUEST, unregistred user!
那位有所有类型钩子参数详解
 
http://www.delphibbs.com/keylife/iblog_show.asp?xid=12481
 
to: Avalon<br> &nbsp; 那里只是介绍了个大概.我想要的是详细介绍如下:<br> &nbsp; WH_MOUSE 对应这样一个类型 tagMOUSEHOOKSTRUCT<br> &nbsp;tagMOUSEHOOKSTRUCT = packed record<br> &nbsp; &nbsp;pt: TPoint;<br> &nbsp; &nbsp;hwnd: HWND;<br> &nbsp; &nbsp;wHitTestCode: UINT;<br> &nbsp; &nbsp;dwExtraInfo: DWORD;<br> &nbsp;end;
 
WH_MOUSE <br>nCode 为HC_ACTION 或 HC_NOREMOVE <br>wParam 包含鼠标的事件消息 <br>lParam 指向MOUSEHOOKSTRUCT型结构体变量的指针 <br>return value: 如果不处理返回0,否则返回非0值
 
tagMOUSEHOOKSTRUCT = packed record<br> &nbsp; &nbsp;pt: TPoint;//光标的坐标<br> &nbsp; &nbsp;hwnd: HWND;//指向接收到mouse消息的窗口<br> &nbsp; &nbsp;wHitTestCode: UINT;//no idea<br> &nbsp; &nbsp;dwExtraInfo: DWORD;//附加信息<br> &nbsp;end;
 
to:ff_ff<br>我要的是键盘的
 
有没有人知道呀
 
lParam<br><br>Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag. This parameter can be a combination of the following values: <br><br>Value Description<br>0-15 Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user's holding down the key.<br>16-23 Specifies the scan code. The value depends on the original equipment manufacturer (OEM).<br>24 Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if the key is an extended key; otherwise, it is 0.<br>25-28 Reserved.<br>29 Specifies the context code. The value is 1 if the ALT key is down; otherwise, it is 0.<br>30 Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up.<br>31 Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released.
 
31位 如果这个位是0,表示按键按下的时候触发,如是1,表示放开时解发
 
多人接受答案了。
 
后退
顶部