(This should work on VB6 and VB5, and it would be nice if it would also work on 32-bit VB4)
I am trying to "open" a .wmf file in a 32-bit VB application in order to get a metafile handle (heMF or hMF), which I can then use to "play" the metafile into a device context with the PlayEnhMetaFile API. I know how to do that bit, and if I only had an .emf file instead of a .wmf file, this would be very simple: Use the GetEnhMetaFile API to get the heMF from the .emf file.
Alas, the file I have is a .wmf file. To get a handle for a .wmf file, you needed to use the GetMetaFile API. Alas, this API became obsolete in 32-bit.
The GetEnhMetaFile API is not suitable for .wmf files.
From reading the MSDN documentation I reckon it must be possible though to take an ordinary .wmf file, somehow process it, and eventually come up with a 32-bit metafile handle (heMF) which I can then use to play the metafile
into a device context.
This is giving me headaches...
I read the MSDN information, and even though (I think) I have a vague idea on what APIs to use, I'm severely hampered: I do not know C or C++. The documentation in MSDN is limited to "This is the API function and this is how it's declared in C++". It doesn't tell you HOW to use it. I have to use this from VB...
I would therefore appreciate a nice self-contained code example in VB on how to take a .wmf and end up with a valid hMF in a 32 bit VB application