Google Groups Home
Help | Sign in
Message from discussion Enumerating EMFPlus metafile records
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
John Hornick [MS]  
View profile
 More options Sep 20 2002, 1:34 pm
Newsgroups: microsoft.public.dotnet.framework.drawing
From: JHorn...@online.microsoft.com (John Hornick [MS])
Date: Fri, 20 Sep 2002 17:28:32 GMT
Local: Fri, Sep 20 2002 1:28 pm
Subject: RE: Enumerating EMFPlus metafile records
Hi,

> In the old Win32 API in wingdi.h, all of the WMF and EMF record
> structures are defined.  Thats fine for normal EMF/WMF, but newer
> applications like Visio 2002 now export EMFPlusDual files.  I've
> checked all of the GDI+ headers defined in
> vc7\PlatformSDK\Include\prerelease (and done a global search for a few
> of the EMFPlus record enumeration values), and the EMFPlus records are
> not defined anywhere.  I need to be able to search text records for
> custom tags we've defined (ie <DataString('CustomerName')>) and
> replace the strings with actual data.  We can do it on all of the
> normal EMF/WMF records, plus we've figured out enough of the
> DrawDriverString record to write in a string of the same length.  We'd
> really prefer, however, to have the real EMFPlus data structures.
> Anyone know where I can get them?

> On a related problem, does anyone know why the PlayRecordCallback
> parameter to the EnumerateMetafile callback is always null?
> Microsoft's own sample code for the Graphics.EnumerateMetafileProc
> Delegate uses the PlayRecord to draw each metafile record; the sample
> doesn't work, however.  I presume this is related to the callbackData
> parameter to Graphics.EnumerateMetafileProc; the documentation says to
> pass in IntPtr.Zero, but I suspect that it should really recieve a
> callback pointer.  However, the PlayRecordCallback delegate doesn't
> match Metafile.PlayRecord's signature (byte [] data instead of IntPtr
> data).  I'd really prefer the IntPtr form, since then I wouldn't have
> to Marshal.Copy the data from the IntPtr data from the
> EnumerateMetafileProc delegate into a byte [] array.

The new EMF+ records are not currently documented. I am checking to
see if there exists any documentation which I can share with you.

If there is, I'll post something here. I expect that would be later
today or early next week.

I think your other question about the callback being null is more
related to System.Drawing and not the underlying GDI+, so it would
be best asked on the microsoft.public.dotnet.framework.drawing
newsgroup. I have experienced that behavior myself, but have not
yet had the bandwidth to solve it.

Thanks,
- John
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Visit http://www.microsoft.com/security for current information on security.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google