Windows MetaFile

I try to design a Windows MetaFile with BP7 for Windows. I used the
following Syntax

procedure PGV.metafile (var MSG : Tmessage);
var  Dateiendung : Pchar;
     metaDC      : HDC;
begin
  Dateiendung:='*.wmf';
  StrCopy(DateiName,Dateiendung);
  if Application^.ExecDialog(New(PFileDialog,
     Init(@Self,PChar(sd_FileOpen),DateiName)))=id_Ok
     then
       begin
         MetaDC:=CreateMetafile(dateiname);
         .
         .
         .
         CopyMetaFile(metaDC,dateiname);
         DeleteMetaFile(CloseMetaFile(metadc));
       end;
end;

When the procedure is done, I have a File on the Harddisk, but i can not
read it with another application. I cant find the source of error.
Is it possible to create an GIF file in BP7 for Windows ???

Thanks    Michael                                      Travi...@aol.com