When you select a fragment of an application data to the Windows Clipboard, most often this is not just a raw ASCII text format you find later in, but several more data formats.
On the picture above a web page is shown that has a fragment selected and copied to the clipboard. Windows Clipboard stores this fragment in at least four different formats. The HTML format is shown.
To find out how many of them are involved when a fragment from a MS Word document is copied to the clipboard -- run this code.
This code sample shows how to access several text-related data formats stored in the Clipboard. To test it Cut or Copy some data to the clipboard. Select data from MS Office documents, web pages, Notepad files and so on.
Two Clipboard Data Formats: HTML Format and Rich Text Format are not standard but the registered ones. To reach data for these formats you have to register them first. Use the RegisterClipboardFormat function. If they are already registered by another application this function returns their actual Ids.
Differently from the standard Clipboard Formats with constant numeric Ids, these two are linked to constant strings.
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc.