//HOOK的主要部分
function MouseHookProc(nCode:Integer;WParam: WPARAM;LParam:LPARAM):LRESULT;stdcall;
var
MouseHookStruct:^TMOUSEHOOKSTRUCT;
nState:SHORT;
begin
Result:=0;
if nCode<0 then
Result:=CallNextHookEx(hHK,nCode,WParam,LParam)
else
begin
if (wParam=WM_RBUTTONDOWN) or (wParam=WM_RBUTTONUP) then Result:=1;
end;
end;