LCL: Better fix range check error in SetCaretPos in Memo (the result of SendMessageW is defined to be of type LRESULT: see MSDN)

git-svn-id: trunk@45724 -
This commit is contained in:
bart 2014-06-28 22:43:48 +00:00
parent 1056fb11be
commit cca4d2158e

View File

@ -1340,7 +1340,7 @@ end;
class procedure TWin32WSCustomMemo.SetCaretPos(const ACustomEdit: TCustomEdit; const NewPos: TPoint);
var
CharIndex: Longint;
CharIndex: LRESULT;
begin
{ EM_LINEINDEX returns the char index of a given line }
CharIndex := Windows.SendMessageW(ACustomEdit.Handle, EM_LINEINDEX, NewPos.Y, 0) + NewPos.X;