Browse Source

* Resource handle is not resource ID

Michaël Van Canneyt 2 years ago
parent
commit
0e2102e172
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/objpas/classes/classes.inc

+ 1 - 1
rtl/objpas/classes/classes.inc

@@ -1418,7 +1418,7 @@ function CreateComponentfromRes(const res : string;Inst : THandle;var Component
     try
     try
       if Result then
       if Result then
         begin
         begin
-        ResStream:=TResourceStream.CreateFromID(Inst,ResID,RT_RCDATA);
+        ResStream:=TResourceStream.Create(Inst,Res,RT_RCDATA);
         try
         try
           Component:=ResStream.ReadComponent(Component);
           Component:=ResStream.ReadComponent(Component);
         finally
         finally