1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<title>Windows Interface Reference: Clipboard structure</title>
6</head>
7
8<body>
9
10<h1>Clipboard</h1>
11
12<p>The clipboard is used as a way of copying data within an application or between
13applications.</p>
14
15<pre>structure Clipboard :
16  sig
17    datatype <a href="#ClipboardFormat">ClipboardFormat</a> =
18        CF_NONE | CF_TEXT | CF_BITMAP | CF_METAFILEPICT | CF_SYLK | CF_DIF | CF_TIFF |
19        CF_OEMTEXT | CF_DIB | CF_PALETTE | CF_PENDATA | CF_RIFF | CF_WAVE | CF_UNICODETEXT |
20        CF_ENHMETAFILE | CF_OWNERDISPLAY | CF_DSPTEXT | CF_DSPBITMAP | CF_DSPMETAFILEPICT |
21        CF_DSPENHMETAFILE | CF_PRIVATE of int | CF_GDIOBJ of int | CF_REGISTERED of int |
22        CF_HDROP | CF_LOCALE
23
24    type HBITMAP and HPALETTE and HWND and HDROP
25
26    datatype <a
27href="#CLIPHANDLE">CLIPHANDLE</a> =
28        CH_NONE |
29        CH_TEXT of string |
30        CH_BITMAP of HBITMAP |
31        CH_METAFILEPICT of Metafile.METAFILEPICT |
32        CH_SYLK of Word8Vector.vector |
33        CH_DIF of Word8Vector.vector |
34        CH_TIFF of Word8Vector.vector |
35        CH_OEMTEXT of string |
36        <a
37name="CH_DIB">CH_DIB</a> of Word8Vector.vector |
38        CH_PALETTE of HPALETTE |
39        CH_PENDATA of Word8Vector.vector |
40        CH_RIFF of Word8Vector.vector |
41        CH_WAVE of Word8Vector.vector |
42        CH_UNICODETEXT of Word8Vector.vector |
43        CH_ENHMETAFILE of Metafile.HENHMETAFILE |
44        CH_OWNERDISPLAY of Word8Vector.vector |
45        CH_DSPTEXT of Word8Vector.vector |
46        CH_DSPBITMAP of Word8Vector.vector |
47        CH_DSPMETAFILEPICT of Word8Vector.vector |
48        CH_DSPENHMETAFILE of Word8Vector.vector |
49        CH_PRIVATE of int * Word8Vector.vector |
50        CH_GDIOBJ of int * Word8Vector.vector |
51        CH_REGISTERED of int * Word8Vector.vector |
52        CH_HDROP of HDROP |
53        CH_LOCALE of Word8Vector.vector
54
55    val ChangeClipboardChain : HWND * HWND -&gt; bool
56    val CloseClipboard : unit -&gt; unit
57    val CountClipboardFormats : unit -&gt; int
58    val EmptyClipboard : unit -&gt; unit
59    val EnumClipboardFormats : ClipboardFormat -&gt; ClipboardFormat
60    val GetClipboardData : ClipboardFormat -&gt; CLIPHANDLE
61    val GetClipboardFormatName : ClipboardFormat -&gt; string
62    val GetClipboardOwner : unit -&gt; HWND
63    val GetClipboardViewer : unit -&gt; HWND
64    val GetOpenClipboardWindow : unit -&gt; HWND
65    val GetPriorityClipboardFormat : ClipboardFormat list -&gt; ClipboardFormat option
66    val IsClipboardFormatAvailable : ClipboardFormat -&gt; bool
67    val OpenClipboard : HWND option -&gt; unit
68    val RegisterClipboardFormat : string -&gt; ClipboardFormat
69    val SetClipboardData : CLIPHANDLE -&gt; unit
70    val SetClipboardViewer : HWND -&gt; HWND
71  end</pre>
72
73<p><tt>datatype <a name="ClipboardFormat">ClipboardFormat</a></tt><br>
74represents the various kinds of information which can be stored on the clipboard.&nbsp; As
75well as the formats defined in Windows the ML interface defines four extra formats.
76&nbsp; CF_NONE is used when no format is specified.&nbsp; CF_PRIVATE, CF_GDIOBJ and
77CF_REGISTERED are used for clipboard formats in the private range, GDI object range and
78registered format range.&nbsp; </p>
79
80<p><tt>datatype <a name="CLIPHANDLE">CLIPHANDLE</a></tt><br>
81is used when extracting information from the clipboard or setting the clipboard contents.</p>
82
83<p>&nbsp;</p>
84</body>
85</html>
86