This commit is contained in:
Alexander 2019-08-30 12:21:55 +03:00
parent 682e1d5fa7
commit 1a7eeb1bc7

View file

@ -17,11 +17,18 @@ protected override void WndProc(ref Message m)
int scrollLines = SystemInformation.MouseWheelScrollLines; int scrollLines = SystemInformation.MouseWheelScrollLines;
for (int i = 0; i < scrollLines; i++) for (int i = 0; i < scrollLines; i++)
{ {
if ((long)m.WParam <= 2147483647) try
{
if ((int)m.WParam >= 0)
SendMessage(Handle, WM_VSCROLL, (IntPtr)0, IntPtr.Zero); SendMessage(Handle, WM_VSCROLL, (IntPtr)0, IntPtr.Zero);
else else
SendMessage(Handle, WM_VSCROLL, (IntPtr)1, IntPtr.Zero); SendMessage(Handle, WM_VSCROLL, (IntPtr)1, IntPtr.Zero);
} }
catch (OverflowException)
{
SendMessage(Handle, WM_VSCROLL, (IntPtr)1, IntPtr.Zero);
}
}
return; return;
} }
base.WndProc(ref m); base.WndProc(ref m);