From 926864b03ee080f9e59b9c05dd8710f76ad168f4 Mon Sep 17 00:00:00 2001 From: Sigmanor Date: Sat, 13 May 2017 20:01:28 +0300 Subject: [PATCH] Fixed bug with scrolling mouse wheel --- Crypto Notepad/CustomRichTextBox.cs | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Crypto Notepad/CustomRichTextBox.cs b/Crypto Notepad/CustomRichTextBox.cs index 073d219..b100a6d 100644 --- a/Crypto Notepad/CustomRichTextBox.cs +++ b/Crypto Notepad/CustomRichTextBox.cs @@ -53,22 +53,22 @@ protected override void OnHandleCreated(EventArgs e) } } - protected override void WndProc(ref Message m) - { - if (m.Msg == WM_MOUSEWHEEL) - { - int scrollLines = SystemInformation.MouseWheelScrollLines; - for (int i = 0; i < scrollLines; i++) - { - if ((int)m.WParam > 0) // when wParam is greater than 0 - SendMessage(this.Handle, WM_VSCROLL, (IntPtr)0, IntPtr.Zero); // scroll up - else - SendMessage(this.Handle, WM_VSCROLL, (IntPtr)1, IntPtr.Zero); // else scroll down - } - return; - } - base.WndProc(ref m); - } + //protected override void WndProc(ref Message m) + //{ + // if (m.Msg == WM_MOUSEWHEEL) + // { + // int scrollLines = SystemInformation.MouseWheelScrollLines; + // for (int i = 0; i < scrollLines; i++) + // { + // if ((int)m.WParam > 0) // when wParam is greater than 0 + // SendMessage(this.Handle, WM_VSCROLL, (IntPtr)0, IntPtr.Zero); // scroll up + // else + // SendMessage(this.Handle, WM_VSCROLL, (IntPtr)1, IntPtr.Zero); // else scroll down + // } + // return; + // } + // base.WndProc(ref m); + //} /// /// Search and Highlight all text in RichTextBox Control