Skip to content

Commit 76bcc30

Browse files
author
joachim.marder
committed
Fixed assigning of DLL Resource handle to TUIRibbon
1 parent 9f520c7 commit 76bcc30

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Designer/FPreview.pas

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ TFormPreview = class(TForm)
8686
procedure CommandCreated(const Sender: TUIRibbon; const Command: TUICommand);
8787
private
8888
{ Private declarations }
89-
FInstance: THandle;
9089
FDocument: TRibbonDocument;
9190
FXmlDoc: TXmlDocument;
9291
FAllApplicationModes: Cardinal;
@@ -174,7 +173,7 @@ constructor TFormPreview.Create(const Instance: THandle;
174173
const Document: TRibbonDocument);
175174
begin
176175
inherited Create(nil);
177-
FInstance := Instance;
176+
Ribbon.ResourceInstance := Instance;
178177
FDocument := Document;
179178
FCommandMap := TDictionary<String, Cardinal>.Create;
180179
FGalleryCommand := TUICommandAnchor.Create(Ribbon, 50001);
@@ -192,7 +191,7 @@ constructor TFormPreview.Create(const Instance: THandle;
192191

193192
destructor TFormPreview.Destroy;
194193
begin
195-
FreeLibrary(FInstance);
194+
FreeLibrary(Ribbon.ResourceInstance);
196195
FXmlDoc.Free;
197196
FCommandMap.Free;
198197
inherited;

0 commit comments

Comments
 (0)