网
网中
Unregistered / Unconfirmed
GUEST, unregistred user!
如题;<br>我用钩子怎么拦截不到,请高手指点。谢谢<br>var<br> _Hook:HHOOK;<br>function HookHandler(iCode: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; <br>begin<br> Result := 0;<br> If iCode < 0 Then Result := CallNextHookEx(NextHook, iCode, wParam, lParam);<br><br> case wparam of<br> WM_DRAWITEM:<br> begin<br> //拦截事件<br> end;<br> WM_NCCALCSIZE:<br> begin<br> //拦截事件<br> end;<br> end;<br>end;<br><br>procedure HookOn(Wnd: HWND); stdcall;<br>begin<br> _Hook := SetWindowsHookEx(WH_GETMESSAGE, HookHandler, HInstance, 0); //全局<br>end;