标签:pos else mouse result 鼠标 code proc object int
procedure SendMouseWheel(destHandle: THandle; goUp: Boolean); var message: TWMMouseWheel; delta: SmallInt; begin if goUp then delta := WHEEL_DELTA else delta := -WHEEL_DELTA; message.Msg := WM_MOUSEWHEEL; message.Keys := 0; message.XPos := 0; message.YPos := 0; message.Result := -1; message.WheelDelta := delta; SendMessage(destHandle, WM_MOUSEWHEEL, TMessage(message).WParam, TMessage(message).LParam); end; procedure TForm2.BitBtn1Click(Sender: TObject); begin SendMouseWheel(Memo1.Handle, True); end; procedure TForm2.BitBtn2Click(Sender: TObject); begin SendMouseWheel(Memo1.Handle, False); end;
标签:pos else mouse result 鼠标 code proc object int
原文地址:https://www.cnblogs.com/onlyou13/p/13213461.html