Playing Enhanced Metafile Records

I am trying to debug Enhanced metafiles being written by a commercially available OCX.  The metafiles playback perfect on NT but will not display the entire metafile on 95 and 98.  To find the meta record causing the problem I need to step through each metafile record and play them one at a time (As opposed to just loading a metafile into a picturebox).  I can enumerate the enhanced metafile (I think??) I just cant play it any ideas or help would be appreciated
BH
bhafnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dsandfordCommented:
Enumerating the Metafile would help find the record.  It is likely that the metafile record is either one that 95/98 cannot process, like SETWORLDTRANSFORM (unlikely), or that some of the logical coordinates used to draw the metafile are out of the 16-bit range that 95/98 are restricted to.  My solution (in C++, in this case) was to:
1)  Enumerate the file, one record at a time and extract any logical coordinates used to draw in the file.  This includes font records, as these contain font sizes.  Basically, find the biggest.
2)  Use this value to scale all logical coordinates in the file down to between 0 and 32767.  Negative values seemed to cause problems.  This is done by enumerating the metafile again, modifying and playing (drawing) each record at a time.

I have done this in C++, but not in VB.  Also, my knowledge of VB is limited.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.