1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
<HTML>
<head><title>wxMetafileDC</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wxmetafiledc"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx145.htm#wxmetafile"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx147.htm#wxmimetypesmanager"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxMetafileDC</H2>
<P>
This is a type of device context that allows a metafile object to be
created (Windows only), and has most of the characteristics of a normal
<B>wxDC</B>. The <A HREF="wx146.htm#wxmetafiledcclose">wxMetafileDC::Close</A> member must be called after drawing into the
device context, to return a metafile. The only purpose for this at
present is to allow the metafile to be copied to the clipboard (see <A HREF="wx145.htm#wxmetafile">wxMetafile</A>).<P>
Adding metafile capability to an application should be easy if you
already write to a wxDC; simply pass the wxMetafileDC to your drawing
function instead. You may wish to conditionally compile this code so it
is not compiled under X (although no harm will result if you leave it
in).<P>
Note that a metafile saved to disk is in standard Windows metafile format,
and cannot be imported into most applications. To make it importable,
call the function <A HREF="wx268.htm#wxmakemetafileplaceable">::wxMakeMetafilePlaceable</A> after
closing your disk-based metafile device context.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx65.htm#wxdc">wxDC</A><BR>
<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/metafile.h><P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx145.htm#wxmetafile">wxMetafile</A>, <A HREF="wx65.htm#wxdc">wxDC</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#topic568">wxMetafileDC::wxMetafileDC</A><BR>
<A HREF="#topic569">wxMetafileDC::~wxMetafileDC</A><BR>
<A HREF="#wxmetafiledcclose">wxMetafileDC::Close</A><BR>
<P>
<HR>
<A NAME="topic568"></A>
<H3>wxMetafileDC::wxMetafileDC</H3>
<P>
<B></B> <B>wxMetafileDC</B>(<B>const wxString& </B><I>filename = ""</I>)<P>
Constructor. If no filename is passed, the metafile is created
in memory.<P>
<HR>
<A NAME="topic569"></A>
<H3>wxMetafileDC::~wxMetafileDC</H3>
<P>
<B></B> <B>~wxMetafileDC</B>()<P>
Destructor.<P>
<HR>
<A NAME="wxmetafiledcclose"></A>
<H3>wxMetafileDC::Close</H3>
<P>
<B>wxMetafile *</B> <B>Close</B>()<P>
This must be called after the device context is finished with. A
metafile is returned, and ownership of it passes to the calling
application (so it should be destroyed explicitly).<P>
</BODY></HTML>
|