我想实现点击鼠标中键就弹出消息(或ctrl+单击鼠标中键)。
做了个dll,全局hook,hook过程如下,但有个问题,就是每点一下中键就会弹出许多消息,我想弹出一个就够了,请问应该怎样写这个代码?function HookMouse(nCode: integer; wParam: wParam; lParam: lParam): LRESULT; stdcall;
begin
  if (nCode = HC_ACTION) and (wParam = WM_MBUTTONUP) then begin
    MessageBox(0, '你按下了鼠标中键', '', 0);
    Result := 1;
  end
  else
    Result := CallNextHookEx(MouseHook, nCode, wParam, lParam);
end;