Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You need to create an object that implements <a href="http://msdn.microsoft.com/en-us/library/ms688421%28v=VS.85%29.aspx"><code>IDataObject</code></a>, and then place it on the clipboard using <a href="http://msdn.microsoft.com/en-us/library/ms686623%28v=VS.85%29.aspx"><code>OleSetClipboard</code></a>.</p> <p>When you place data in the clipboard you have the ability to specify multiple formats. This is so that the application reading the clipboard can enumerate the formats and decide which one to use. </p> <p>There are quite a few <a href="http://msdn.microsoft.com/en-us/library/ff729168%28v=VS.85%29.aspx">"<em>standard</em>" clipboard formats</a> (with known constant values), e.g.:</p> <ul> <li><code>CF_BITMAP</code>: A handle to a bitmap (HBITMAP).</li> <li><code>CF_DIB</code>: A memory object containing a <a href="http://msdn.microsoft.com/en-us/library/dd183375%28v=VS.85%29.aspx">BITMAPINFO</a> structure followed by the bitmap bits.</li> <li><code>CF_DIBV5</code>: A memory object containing a <a href="http://msdn.microsoft.com/en-us/library/dd183381%28v=VS.85%29.aspx">BITMAPV5HEADER</a> structure followed by the bitmap color space information and the bitmap bits.</li> </ul> <p>You can also register custom formats using <a href="http://msdn.microsoft.com/en-us/library/ms649049%28v=VS.85%29.aspx"><code>RegisterClipboardFormat</code></a>. Office exposes images as a number of different formats that they've registered, e.g.:</p> <pre><code>DWORD CF_PNG = RegisterClipboardFormat("PNG"); DWORD CF_JFIF = RegisterClipboardFormat("JFIF"); DWORD CF_GIF = RegisterClipboardFormat("GIF"); DWORD CF_ENHMETAFILE = RegisterClipboardFormat("CF_ENHMETAFILE"); DWORD CF_METAFILEPICT = RegisterClipboardFormat("CF_METAFILEPICT "); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload