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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
<HTML>
<head><title>Clipboard functions</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="clipsboard"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx264.htm#functions"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx269.htm#printersettings"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx271.htm#miscellany"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>Clipboard functions</H2>
<P>
These clipboard functions are implemented for Windows only.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/clipbrd.h><P>
<A HREF="#topic1081">::wxClipboardOpen</A><BR>
<A HREF="#topic1082">::wxCloseClipboard</A><BR>
<A HREF="#topic1083">::wxEmptyClipboard</A><BR>
<A HREF="#topic1084">::wxEnumClipboardFormats</A><BR>
<A HREF="#topic1085">::wxGetClipboardData</A><BR>
<A HREF="#topic1086">::wxGetClipboardFormatName</A><BR>
<A HREF="#topic1087">::wxIsClipboardFormatAvailable</A><BR>
<A HREF="#topic1088">::wxOpenClipboard</A><BR>
<A HREF="#topic1089">::wxRegisterClipboardFormat</A><BR>
<A HREF="#topic1090">::wxSetClipboardData</A><BR>
<P>
<HR>
<A NAME="topic1081"></A>
<H3>::wxClipboardOpen</H3>
<P>
<B>bool</B> <B>wxClipboardOpen</B>()<P>
Returns TRUE if this application has already opened the clipboard.<P>
<HR>
<A NAME="topic1082"></A>
<H3>::wxCloseClipboard</H3>
<P>
<B>bool</B> <B>wxCloseClipboard</B>()<P>
Closes the clipboard to allow other applications to use it.<P>
<HR>
<A NAME="topic1083"></A>
<H3>::wxEmptyClipboard</H3>
<P>
<B>bool</B> <B>wxEmptyClipboard</B>()<P>
Empties the clipboard.<P>
<HR>
<A NAME="topic1084"></A>
<H3>::wxEnumClipboardFormats</H3>
<P>
<B>int</B> <B>wxEnumClipboardFormats</B>(<B>int</B><I>dataFormat</I>)<P>
Enumerates the formats found in a list of available formats that belong
to the clipboard. Each call to this function specifies a known
available format; the function returns the format that appears next in
the list. <P>
<I>dataFormat</I> specifies a known format. If this parameter is zero,
the function returns the first format in the list. <P>
The return value specifies the next known clipboard data format if the
function is successful. It is zero if the <I>dataFormat</I> parameter specifies
the last format in the list of available formats, or if the clipboard
is not open. <P>
Before it enumerates the formats function, an application must open the clipboard by using the
wxOpenClipboard function. <P>
<HR>
<A NAME="topic1085"></A>
<H3>::wxGetClipboardData</H3>
<P>
<B>wxObject *</B> <B>wxGetClipboardData</B>(<B>int</B><I>dataFormat</I>)<P>
Gets data from the clipboard.<P>
<I>dataFormat</I> may be one of:<P>
<UL>
<LI> wxCF_TEXT or wxCF_OEMTEXT: returns a pointer to new memory containing a null-terminated text string.
<LI> wxCF_BITMAP: returns a new wxBitmap.
</UL>
<P>
The clipboard must have previously been opened for this call to succeed.<P>
<HR>
<A NAME="topic1086"></A>
<H3>::wxGetClipboardFormatName</H3>
<P>
<B>bool</B> <B>wxGetClipboardFormatName</B>(<B>int</B><I>dataFormat</I>, <B>const wxString& </B><I>formatName</I>, <B>int</B><I>maxCount</I>)<P>
Gets the name of a registered clipboard format, and puts it into the buffer <I>formatName</I> which is of maximum
length <I>maxCount</I>. <I>dataFormat</I> must not specify a predefined clipboard format.<P>
<HR>
<A NAME="topic1087"></A>
<H3>::wxIsClipboardFormatAvailable</H3>
<P>
<B>bool</B> <B>wxIsClipboardFormatAvailable</B>(<B>int</B><I>dataFormat</I>)<P>
Returns TRUE if the given data format is available on the clipboard.<P>
<HR>
<A NAME="topic1088"></A>
<H3>::wxOpenClipboard</H3>
<P>
<B>bool</B> <B>wxOpenClipboard</B>()<P>
Opens the clipboard for passing data to it or getting data from it.<P>
<HR>
<A NAME="topic1089"></A>
<H3>::wxRegisterClipboardFormat</H3>
<P>
<B>int</B> <B>wxRegisterClipboardFormat</B>(<B>const wxString& </B><I>formatName</I>)<P>
Registers the clipboard data format name and returns an identifier.<P>
<HR>
<A NAME="topic1090"></A>
<H3>::wxSetClipboardData</H3>
<P>
<B>bool</B> <B>wxSetClipboardData</B>(<B>int</B><I>dataFormat</I>, <B>wxObject *</B><I>data</I>, <B>int</B><I>width</I>, <B>int</B><I>height</I>)<P>
Passes data to the clipboard.<P>
<I>dataFormat</I> may be one of:<P>
<UL>
<LI> wxCF_TEXT or wxCF_OEMTEXT: <I>data</I> is a null-terminated text string.
<LI> wxCF_BITMAP: <I>data</I> is a wxBitmap.
<LI> wxCF_DIB: <I>data</I> is a wxBitmap. The bitmap is converted to a DIB (device independent bitmap).
<LI> wxCF_METAFILE: <I>data</I> is a wxMetafile. <I>width</I> and <I>height</I> are used to give recommended dimensions.
</UL>
<P>
The clipboard must have previously been opened for this call to succeed.<P>
</BODY></HTML>
|