metafile aus dem Clipboard
Hi,
does anybody get a metafile from the clipboard ever? The Delphi Buglist
says:
Description
Reported by Anders Melander
Help for TMetafile.LoadFromClipboardFormat claims that
"LoadFromClipboardFormat replaces the current image with the data pointed
to by the AData parameter" and "The palette for the metafile is specified
by the APalette parameter". This is not correct; Both the AData and
APalette parameters are ignored. Instead the data is retrieved directly
from the clipboard.
IMO TMetafile.LoadFromClipboardFormat is poorly implemented; It should
only access the clipboard directly if the AData parameter is zero, it
should make use of the AFormat parameter and it should handle both
CF_ENHMETAFILE and CF_METAFILEPICT without using the clipboard to do the
conversion (unless AData is zero).
My Code:
meta:=TMetafile.Create;
Meta.LoadFromClipboardFormat (CF_METAFILEPICT,0,0);
// Or: Meta.LoadFromClipboardFormat
(CF_METAFILEPICT,Clipboard.GetAsHandle (CF_METAFILEPICT),0);
meta.SaveToFile ('test.wmf')
meta.Free;
In both versions there is only an exception.
Can you help me?
Mit freundlichen Gr?en / with best regards
Christian Hartnick
Dipl.-Wirtsch.-Inf, Senior IT-Manager
Zeilbeck Design Company, Leuchtenbergring 20, 81677 Mnchen, Germany
hartn...@zeilbeck.de, Tel.: 089 547065 33, Fax: 089 547065 30
http://www.zeilbeck.de