Board index » delphi » wmf to emf ? for tmetafile

wmf to emf ? for tmetafile

I have a wmf-handle, but I need the emf-handle to assign
metafile.handle := emfHandle;
has someone an example for a conversion ?

thank you

 

Re:wmf to emf ? for tmetafile


Quote
In article <3d197bc3_1@dnews>, Tw wrote:
> I have a wmf-handle, but I need the emf-handle to assign
> metafile.handle := emfHandle;
> has someone an example for a conversion ?

aMetafile:= TMetafile.Create;

aMetafile.Handle:= aWMFHandle;

aMetafile.Enhanced:= false;

Should work, in theory.

You might want to read this thread though:

Subject: Headache!!! I just can't get how to use TMetafile
Date: Sat, 8 Jun 2002 14:00:38 +0200

Gordon

Re:wmf to emf ? for tmetafile


no, this cannot work, aMetafile.handle accepts only emf-handles,
not wmf-handles. I get AV EInvalidGraphic when I do this.

And Tmetafile has internally also only emf, not wmf;
the enhanced-property is only for saveToStream , nothing else,
it should better be named saveEnhanced-property.

best regards

Quote
> aMetafile:= TMetafile.Create;

> aMetafile.Handle:= aWMFHandle;

> aMetafile.Enhanced:= false;

> Should work, in theory.

> You might want to read this thread though:

> Subject: Headache!!! I just can't get how to use TMetafile
> Date: Sat, 8 Jun 2002 14:00:38 +0200

> Gordon

Re:wmf to emf ? for tmetafile


You must create a new TMetafile+TMetaFileCanvas for EMF and draw your wmf on
this new canvas (Canvas.Draw). No other way...

--
With best regards, Mike Shkolnik
E-Mail: mshkol...@scalabium.com
WEB: http://www.scalabium.com

TW <anhi...@t-online.de> D??? ???Y??:3d197bc3_1@dnews...

Quote
> I have a wmf-handle, but I need the emf-handle to assign
> metafile.handle := emfHandle;
> has someone an example for a conversion ?

> thank you

Re:wmf to emf ? for tmetafile


"Mike Shkolnik" <mshkolnik2...@ukr.net> schreef in bericht
news:3d19ccfa_2@dnews...

Quote
> You must create a new TMetafile+TMetaFileCanvas for EMF and draw your wmf
on
> this new canvas (Canvas.Draw). No other way...

> --
> With best regards, Mike Shkolnik
> E-Mail: mshkol...@scalabium.com
> WEB: http://www.scalabium.com

> TW <anhi...@t-online.de> D??? ???Y??:3d197bc3_1@dnews...
> > I have a wmf-handle, but I need the emf-handle to assign
> > metafile.handle := emfHandle;
> > has someone an example for a conversion ?

> > thank you

I wonder: have you tried setting the metafile.enhanced = false for your emf?
For as far as I know this is enough...

Other Threads