richmemo: fix for win32 OnChange event after GetAttributes proc. Removed debug out from sample project

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@961 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
skalogryz
2009-09-19 18:11:58 +00:00
parent 06f6bd2021
commit 6a5ffd2533
5 changed files with 89 additions and 151 deletions

View File

@@ -204,7 +204,6 @@ var
NeedLock : Boolean;
eventmask : LongWord;
begin
writeln('[GetTextAttributes] begin');
if not Assigned(RichEditManager) or not Assigned(AWinControl) then begin
Result := false;
Exit;
@@ -221,15 +220,14 @@ begin
RichEditManager.SetSelection(AWinControl.Handle, TextStart, 1);
Result := RichEditManager.GetSelectedTextStyle(AWinControl.Handle, Params );
RichEditManager.SetSelection(AWinControl.Handle, OrigStart, OrigLen);
UnlockRedraw(AWinControl.Handle);
UnlockRedraw(AWinControl.Handle, false);
end else begin
LockRedraw(AWinControl.Handle);
Result := RichEditManager.GetSelectedTextStyle(AWinControl.Handle, Params);
UnlockRedraw(AWinControl.Handle);
UnlockRedraw(AWinControl.Handle, false);
end;
SendMessage(AWinControl.Handle, EM_SETEVENTMASK, 0, eventmask);
writeln('[GetTextAttributes] end');
end;