if zDelta>200 then begin
keybd_event(VK_Right, MapVirtualKey(VK_Right, 0), 0, 0); //RIGHT Down
keybd_event(VK_Right, MapVirtualKey(VK_Right, 0), KEYEVENTF_KEYUP, 0);//RIGHT Up
end else begin
keybd_event(VK_Left , MapVirtualKey(VK_Left , 0), 0, 0); //LEFT Down
keybd_event(VK_Left , MapVirtualKey(VK_Left , 0), KEYEVENTF_KEYUP, 0);//LEFT Up
end;
keybd_event(VK_Control, MapVirtualKey(VK_Control, 0), KEYEVENTF_KEYUP, 0);//CTRL Up
//end;
PMsg(Msg)^.Message := 0;//因为侧键消息已经本地处理过了,不必再交给其它线程处理
end else Result := CallNextHookEx(HK, Code, WParam, Longint(@Msg));//如果不是MPC,则向下传递
end else Result := CallNextHookEx(HK, Code, WParam, Longint(@Msg));//如果不是两个蓝色侧键则向下传递
end;
function EnableWheelHook: Boolean; stdcall; export;//█████████ 加载钩子
begin
if HK=0 then begin
HK := SetWindowsHookEx(WH_GETMESSAGE, @WheelHookProc, Hinstance, 0);
Result := True;
end else Result := False;
end;
function DisableWheelHook: Boolean; stdcall; export;//████████▌卸载钩子
begin
if HK<>0 then begin
UnHookWindowsHookEx(HK);
HK := 0;
Result := True;
end else Result := False;
end;
end.
QQ:7995.7944(薪丝路)