This is a (surprise!) CDialog derived class that implements a "spy" on the Windows clipboard. Data will be added automatically once you make a copy or cut in any window, that appears in the dialog as new pocket (button). The pocket will have an appropriate icon and provides customizable tips. To copy data from the pocket to the clipboard just press the button.

To use this in an application you can save the last active window and make a paste to the window if you override PocketToClip function that is called when a user presses the pocket. Alternatively, you can call this function without pressing the pocket to put data to the clipboard. 

The 2 functions that actually get and set the data are virtual. You can override them if you want to handle the data in some specific format since the clipboard can return the data in different formats usually. The first format is the most convenient format. By default this class does not save the clipboard data in custom formats because of different storage types. If you want to save the data in registered clipboard format you have to define OX_CLIP_DO_CUSTOM_FORMATS macro. The data in custom registered format may come with different types of the storage and not just HGLOBAL or HBITMAP that can be copied and stored safely, but also like pointers to IStorage object. There is no guarantee that if we save this pointer that next time this pointer will actually be valid, as the data might have changed already. So, it is up to you to decide whether you want to work with this format or not.

Usually we do not have to do anything additional to use this class. Just insert the class in your project and it is ready to use. The class provides many helper functions to customize drawing, like adjusting different offsets, customizable icons and their sizes.