From 526c8601862b24d14f10d3c6a353746931bf256f Mon Sep 17 00:00:00 2001 From: skalogryz Date: Sat, 24 Oct 2009 21:36:20 +0000 Subject: [PATCH] fix for win richmemo scrollbars git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@988 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/richmemo/win32/win32richmemoproc.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/richmemo/win32/win32richmemoproc.pas b/components/richmemo/win32/win32richmemoproc.pas index 8f82cce9a..b65ea5708 100644 --- a/components/richmemo/win32/win32richmemoproc.pas +++ b/components/richmemo/win32/win32richmemoproc.pas @@ -303,12 +303,17 @@ begin SendMessage(RichEditWnd, EM_EXSETSEL, 0, PtrInt(@Range)); end; -class procedure TRichEditManager.SetHideSelection(RichEditWnd: Handle; AValue: Boolean); +class procedure TRichEditManager.SetHideSelection(RichEditWnd: Handle; AValue: Boolean); +var + style : LResult; begin + // res-setting options might RichEdit style. Must restore it, after option is changed + style := GetWindowLong(RichEditWnd, GWL_STYLE); if AValue then SendMessage(RichEditWnd, EM_SETOPTIONS, ECOOP_AND, not ECO_NOHIDESEL) else SendMessage(RichEditWnd, EM_SETOPTIONS, ECOOP_OR, ECO_NOHIDESEL); + SetWindowLong(RichEditWnd, GWL_STYLE, style); end; type