Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

binding windows meta file to resource file

Status
Not open for further replies.

serkanb

Programmer
Jan 30, 2002
19
0
0
TR
Does anyone know how to bind wmf file to a *.res file?
Thanks for your replies...
 
I suppose it's the same way as binding an ordinary bitmap or other file.

//Nordlund
 
Hi.
This example uses the file Test.wmf...

Test.rc
Code:
Test WMF Test.wmf

Run brcc32:
Code:
BRCC32 Test.rc

...And a code snippet to extract the file, first to a recource stream, then to a file...

Code:
{$R Test.res}

procedure TForm1.ExtractFile;
var
  RS: TResourceStream;
begin
  RS := TResourceStream.Create(0, 'Test', 'WMF');
  RS.SaveToFile('C:\Test.wmf');
  RS.Free;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ExtractFile;
end;


//Nordlund
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top