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

View file

@ -17,10 +17,17 @@ 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
SendMessage(Handle, WM_VSCROLL, (IntPtr)0, IntPtr.Zero); {
else if ((int)m.WParam >= 0)
SendMessage(Handle, WM_VSCROLL, (IntPtr)0, IntPtr.Zero);
else
SendMessage(Handle, WM_VSCROLL, (IntPtr)1, IntPtr.Zero);
}
catch (OverflowException)
{
SendMessage(Handle, WM_VSCROLL, (IntPtr)1, IntPtr.Zero); SendMessage(Handle, WM_VSCROLL, (IntPtr)1, IntPtr.Zero);
}
} }
return; return;
} }