Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Metafiles and the Clipboard

10 views
Skip to first unread message

Arnold Curry

unread,
May 28, 2002, 11:33:45 AM5/28/02
to
Hello,

Does anyone know how to paste a Framework Metafile object to the Clipboard
so it can be pasted into an Office 2000 document (i.e Word, Excel,
PowerPoint)? I have no problem with text or bitmaps. Metafile objects work
as long as I paste the copied Metafile object back into managed code (using
C#). Also, I can create a metafile as an external file and use the import
Picture on the Word Insert menu and that works fine. This suggests that the
metafile I've saved has both GDI and GDI+ records. The GDI+ records should
be ignored by GDI so I don't understand why this doesn't work I am using a
memory stream to draw on the metafile when I paste it to the clipboard so
there are no files to deal with. When I try to paste the metafile into Word,
nothing shows and there are no errors??

Any help would be appreciated.

Thanks.

Arnold Curry


John Hornick [MS]

unread,
May 28, 2002, 1:16:26 PM5/28/02
to
Hi,


You need to Metafile.GetHenhmetafile() and then put that on the clipboard
using Win32 Clipboard APIs (interop).

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.

0 new messages