Taming the Clipboard, Part 1
Harnessing the full power of Windows clipboard can bring nice user-friendly advantages to your applications. Face it, users are accustomed to Ctrl + C and Ctrl + V. Most programmers content themselves with transferring only text data and sometimes images to and from the clipboard, and they do it through the available helper classes and methods of the framework they use - MFC, VCL, NET Framework. Both Borland VCL and Microsoft NET Framework provide classes, which make it easy to manipulate plain text, images, and sometimes rich text format. MFC, on the other hand, does little more than providing access to the OLE interface to the clipboard, which is a bit of overkill in my opinion. Working with standard data is not enough to make a good application. With little effort the clipboard can be used to integrate you application nicely with other well-written software.
In this article I will explain the basics of the clipboard, demonstrate how it can be used to exchange data with Windows Explorer and Microsoft Word and Excel. I will deliberately stay away from the dark corners of Windows, where OLE and COM lurk.