Populates an IDataObject object with HTML content.
Any COM object that implements the IDataObject interface and the SetData method.
The raw HTML markup string fragment to set.
Populates an IDataObject object with HTML content.
Visual Basic |
---|
Public Function SetDataObjectHTML( _ ByVal DataObject As Unknown, _ ByVal HTML As String _ ) As Boolean |
Any COM object that implements the IDataObject interface and the SetData method.
The raw HTML markup string fragment to set.
Returns True if IDataObject::SetData was successful.
Used for OLE drag-and-drop and clipboard operations. This helper method sets Microsoft specific HTML format and plain text/html format to a data object implementing IDataObject interface. You must make sure your object implements the SetData method.
CF_HTML is entirely text format and uses the transformation format UTF-8. It includes a description, a context, and within the context, the fragment. The format name of a clipboard containing CF_HTML data is HTML Format. Therefore, if you use functions such as RegisterClipboardFormat, pass "HTML Format" in the format name parameter. This section gives a code example of a clipboard using CF_HTML and discusses the three components of the CF_HTML clipboard format.
Version:0.9
StartHTML:71
EndHTML:170
StartFragment:140
EndFragment:160
StartSelection:140
EndSelection:160
<!DOCTYPE>
<HTML>
<HEAD>
<TITLE>The HTML Clipboard</TITLE>
<BASE HREF="http://sample/specs">
</HEAD>
<BODY>
<!--StartFragment -->
<P>The Fragment</P>
<!--EndFragment -->
</BODY>
</HTML>