David Van Bedaf asked me to post this message.
I'm confronted with a few problems regarding displaying existing
WMF-files stored on disk.
- How can I define the dimensions of the rectangle in which to display
the WMF ? I can see no possibilities when looking at 'TMetaHeader'.
- Same question for the mapping mode to use.
- What about 'placeable Metafiles' ? How to read the additional
header, which is said to have a field 'bbox' with the coordinates of
the rectangle that encloses the picture ?
- How can I know whether the WMF-file I'm loading is a normal metafile
or a placeable metafile ? The 'GetMetaFile' function isn't compatible
with these placeable metafiles, hence the problem. To display these
metafiles I have to strip the 22 byte header and create a standard WMF
using 'SetMetaFileBits' with the remaining bytes. I haven't succeeded
yet, however.
- How can I stretch the WMF to chosen dimensions (e.g. full screen)?
The code I'm using at the moment looks like this
case message of
wm_Paint:
begin
hDevC := BeginPaint(hWindow, ps);
hMF := GetMetaFile(mfName);
SetMapMode (hDevC, MM_HIMETRIC); (*just a wild guess*)
PlayMetaFile (hDevC, hMF);
EndPaint(hWindow, ps);
end;
Any suggestions to get me on the right track are welcome.
--
------------------------------Dr. Brigitte
Verdonk------------------------------
Dept. of Math. and Comp. Sc. Tel. +32 3
820.24.03
University of Antwerp (UIA) Fax. +32 3 820.24.21
Universiteitsplein 1
B2610 Wilrijk-Antwerp (Belgium) Email: verd...@uia.ua.ac.be
--------------------------------------------------------------------------------