[Mike Williams said] Check out the CreateEnhMetaFile API
function which will allow your VB6 code to create an
enhanced metafile
[A Bulsari said] OK. Could you please also comment on the
SVG format? Is it incompatible with Word, PowerPoint, etc.
or is there some other trouble with it?
I've never used svg images. As far as I can gather SVG is a XML based
relative newcomer and I think some browsers, including Windows
Explorer, don't support it by default unless you download a suitable
add-on. I certainly can't seem to see any of them when I search for
them. My IE browser appears to convert them to .png and sometimes they
appear as jpegs? I downloaded a 'playing card graphic' with an .svg
extension from the web just now and I can't get it into a MS Word
document. In fact I can't get anything to recognise it at all so I
cannot see what graphic it actually contains. I might be doing
something wrong though because as I said I've never used svg before.
I've just read somewhere that MS Word does not natively support them
and that to get them into a Word document you need to right click the
svg image in a browser and choose the option Copy SVG and the use
Paste Special to paste it into the Word document as a bitmap, which
seems to defeat the object, and in any case any image I right click in
my IE browser that purports to be a svg image is in fact something
else (possibly converted by my browser)? I can't get an svg into my
browser so I can't do that anyway. All this is mostly guess work
though and is just bits and pieces of what I have gleaned in the last
ten minutes from Google.
I could check the API function, but since I will switch to
Jabaco slowly, I should minimise my dependence on Windows
APIs. Once I know the commands used in .wmf and .emf, it
should not be difficult to produce .emf files (particularly
if they are text files like PostScript, which I used to
produce from Fortran programs) straight from VB6 by Print
commands. Do you know of a good Internet site where I can
see simple examples of .wmf/.emf files, and a site where the
commands are listed?
There are millions of .wmf and .emf files on the web if you just want
the graphic files themselves to look at, but I can't at the moment
find anything useful regarding the specific file format. I do know
though that they are certainly not text based files because I've just
loaded a few of them (a few very small ones I created myself and one
or two small files already on my machine) into a Byte array and
examined the contents. There is a tiny bit of text (the word EMF) but
the rest is just numbers. Obviously the numbers it contains will be
various bits of header and intended default image size information
followed by other numbers representing specific graphic operations
(ellipse, lineto, TextOut, etc) and the parameters that relate to them
but I can't find any detailed specification to help me out in
analysing it. You'd probably be able to do it eventually by
deliberately creating small emf files each containing just one or two
specific drawing commands and building up from there once you had got
one specific drawing command analysed but it would be a hard slog
without a reference of some kind to help you. All I know so far is
that they are definitely not text based. I've just downloaded what are
supposed to be the file format descriptions from http://www.wotsit.org
but all they have is the Microsoft description of emf images, which
tells you nothing at all about the actual file format! I do seem to
recall http://www.wotsit.org having a proper detailed description of
the specific file format a long time ago (although I'm not absolutely
certain on that point) but if it ever was the case then Micro$oft have
since "nobbled" them!
Mike