Procedure LoadStringTable(TableName:String;SL:TStrings);
var
RS: TResourceStream;
begin
RS := TResourceStream.Create( HInstance, TableName, RT_RCDATA);
try
SL.LoadFromStream(RS);
finally
RS.Free;
end;
end;
// Usage :
var
String1, String2, String3 : String;
StrList:TStringList;
Begin
StrList:=TStringList.Create;
try
LoadStringTable('RCData',StrList);
String1:= StrList[0];
String2:= StrList[1];
String3:= StrList[2];
finally
StrList.Free;
end;
end;
|