You've already forked lazarus-ccr
richmemo: win32 prevent selection change on inline insert
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3901 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -811,6 +811,7 @@ var
|
|||||||
c: TWin32Inline;
|
c: TWin32Inline;
|
||||||
Obj: TREOBJECT;
|
Obj: TREOBJECT;
|
||||||
sl, ss: Integer;
|
sl, ss: Integer;
|
||||||
|
eventmask: Integer;
|
||||||
const
|
const
|
||||||
PointSize = 72.0;
|
PointSize = 72.0;
|
||||||
RtfSizeToInch = 2.54 * 1000.0;
|
RtfSizeToInch = 2.54 * 1000.0;
|
||||||
@ -822,6 +823,7 @@ begin
|
|||||||
hnd:=(AWinControl.Handle);
|
hnd:=(AWinControl.Handle);
|
||||||
|
|
||||||
RichEditManager.GetSelection(hnd, ss, sl);
|
RichEditManager.GetSelection(hnd, ss, sl);
|
||||||
|
eventmask:=RichEditManager.SetEventMask(AWinControl.Handle, 0);
|
||||||
try
|
try
|
||||||
RichEditManager.SetSelection(hnd, ATextStart, ATextLength);
|
RichEditManager.SetSelection(hnd, ATextStart, ATextLength);
|
||||||
SendMessage(hnd, EM_GETOLEINTERFACE, 0, LPARAM(@rch));
|
SendMessage(hnd, EM_GETOLEINTERFACE, 0, LPARAM(@rch));
|
||||||
@ -859,6 +861,7 @@ begin
|
|||||||
if Result then wsObj:=c;
|
if Result then wsObj:=c;
|
||||||
finally
|
finally
|
||||||
RichEditManager.SetSelection(hnd, ss, sl);
|
RichEditManager.SetSelection(hnd, ss, sl);
|
||||||
|
RichEditManager.SetEventMask(AWinControl.Handle, eventmask);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user