From 9df1d93d359a3426e6d7a56a25aa7270942a7785 Mon Sep 17 00:00:00 2001 From: skalogryz Date: Mon, 25 Jun 2018 02:12:35 +0000 Subject: [PATCH] richmemo: win32 - cleanup warnings git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6526 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/richmemo/win32/win32richmemo.pas | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/richmemo/win32/win32richmemo.pas b/components/richmemo/win32/win32richmemo.pas index eeb3b8003..b8b1ea29f 100644 --- a/components/richmemo/win32/win32richmemo.pas +++ b/components/richmemo/win32/win32richmemo.pas @@ -400,6 +400,7 @@ begin end else begin sz.cx:=0; sz.cy:=0; + pts:=Point(0,0); end; rminline.Draw(canvas, sz); @@ -1194,7 +1195,7 @@ var p : POINTL; begin if not Assigned(AWinControl) then - inherited + Result:=0 else begin p.x:=x; p.y:=y; @@ -1205,7 +1206,10 @@ end; class function TWin32WSCustomRichMemo.Search(const AWinControl: TWinControl; const ANiddle: string; const SearchOpts: TIntSearchOpt): Integer; begin - if not Assigned(RichEditManager) or not Assigned(AWinControl) then Exit; + if not Assigned(RichEditManager) or not Assigned(AWinControl) then begin + Result:=-1; + Exit; + end; Result:=RichEditManager.Find(AWinControl.Handle, UTF8Decode(ANiddle), SearchOpts); end; @@ -1488,11 +1492,11 @@ begin // When theming is enabled, and the component should have a border around it, // let the theme manager handle it Handled:=(GetWindowLong(AWindow, GWL_EXSTYLE) and WS_EX_CLIENTEDGE <> 0) and (ThemeServices.ThemesEnabled); + Result := 0; if Handled then begin // Paint into this DC WindowProc(AWindow, WM_NCPAINT, WParam, LParam); ThemeServices.PaintBorder(RichMemo, True); - Result := 0; end; end;