From 25545a8de78717e655f54fe3c06a5a158af74329 Mon Sep 17 00:00:00 2001 From: Sigmanor Date: Sun, 5 Feb 2017 22:30:06 +0200 Subject: [PATCH] Changed text selection behavior --- Crypto Notepad/CustomRichTextBox.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Crypto Notepad/CustomRichTextBox.cs b/Crypto Notepad/CustomRichTextBox.cs index 8a5260e..073d219 100644 --- a/Crypto Notepad/CustomRichTextBox.cs +++ b/Crypto Notepad/CustomRichTextBox.cs @@ -43,6 +43,16 @@ public CustomRichTextBox() //and this one issues the control to perform scrolling private const int WM_VSCROLL = 0x115; + protected override void OnHandleCreated(EventArgs e) + { + base.OnHandleCreated(e); + if (!base.AutoWordSelection) + { + base.AutoWordSelection = true; + base.AutoWordSelection = false; + } + } + protected override void WndProc(ref Message m) { if (m.Msg == WM_MOUSEWHEEL)