Files Delphi

Title: How to load Rft Text from a resource file into a TRichEdit
implementation
{$R *.dfm}
{$R textres.res} //
procedure TForm1.Button1Click(Sender: TObject);
var
rs: TResourceStream;
begin
rs := TResourceStream.Create(hinstance, 'TESTDOC', RT_RCDATA);
try
Richedit1.PlainText := False;
TempStream.Position := 0;
Richedit1.Lines.LoadFromStream(rs);
finally
rs.Free;
end;
end;