|
@@ -47,6 +47,8 @@ type
|
|
FUseRichEdit: Boolean;
|
|
FUseRichEdit: Boolean;
|
|
FRichEditLoaded: Boolean;
|
|
FRichEditLoaded: Boolean;
|
|
FCallback: IRichEditOleCallback;
|
|
FCallback: IRichEditOleCallback;
|
|
|
|
+ class constructor Create;
|
|
|
|
+ class destructor Destroy;
|
|
procedure SetRTFTextProp(const Value: AnsiString);
|
|
procedure SetRTFTextProp(const Value: AnsiString);
|
|
procedure SetUseRichEdit(Value: Boolean);
|
|
procedure SetUseRichEdit(Value: Boolean);
|
|
procedure UpdateBackgroundColor;
|
|
procedure UpdateBackgroundColor;
|
|
@@ -71,7 +73,7 @@ procedure Register;
|
|
implementation
|
|
implementation
|
|
|
|
|
|
uses
|
|
uses
|
|
- ShellApi, BidiUtils, PathFunc, ComObj;
|
|
|
|
|
|
+ ShellApi, BidiUtils, PathFunc, ComObj, Themes, ComCtrls;
|
|
|
|
|
|
const
|
|
const
|
|
RICHEDIT_CLASSW = 'RichEdit20W';
|
|
RICHEDIT_CLASSW = 'RichEdit20W';
|
|
@@ -228,6 +230,11 @@ end;
|
|
|
|
|
|
{ TRichEditViewer }
|
|
{ TRichEditViewer }
|
|
|
|
|
|
|
|
+class constructor TRichEditViewer.Create;
|
|
|
|
+begin
|
|
|
|
+ TCustomStyleEngine.RegisterStyleHook(TRichEditViewer, TRichEditStyleHook);
|
|
|
|
+end;
|
|
|
|
+
|
|
constructor TRichEditViewer.Create(AOwner: TComponent);
|
|
constructor TRichEditViewer.Create(AOwner: TComponent);
|
|
begin
|
|
begin
|
|
inherited;
|
|
inherited;
|
|
@@ -235,6 +242,11 @@ begin
|
|
FCallback := TBasicRichEditOleCallback.Create;
|
|
FCallback := TBasicRichEditOleCallback.Create;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+class destructor TRichEditViewer.Destroy;
|
|
|
|
+begin
|
|
|
|
+ TCustomStyleEngine.UnregisterStyleHook(TRichEditViewer, TRichEditStyleHook);
|
|
|
|
+end;
|
|
|
|
+
|
|
destructor TRichEditViewer.Destroy;
|
|
destructor TRichEditViewer.Destroy;
|
|
begin
|
|
begin
|
|
inherited;
|
|
inherited;
|