I am using Delphi XE Starter. I created the CCs.RC file and added this file to the project. A typical line in my CCs.RC file is as follows:
Danish1cc Text Danish1.cc
Immediately after the implementation line, I added
{$R CCs}
When I try to read this file in an existing string list, I get an error [EResNotFound][1]. Here is the code I used to try and read the file:
procedure LoadStringListFromResource(const ResName: string;SL : TStringList);
var
RS: TResourceStream;
begin
RS := TResourceStream.Create(HInstance, ResName, RT_RCDATA);
try
SL.LoadFromStream(RS);
finally
RS.Free;
end;
end;
LoadStringListFromResource('Danish1cc',MySL)
My goal is to insert the file into the EXE and, of course, read it :) Thanks for any help.
source
share