The Clipboard: 3 Using The Clipboard

Up: GEOS SDK TechDocs | Up | Down | Prev: 2 Transfer Data Structures | Next: 4 Using Quick-Transfer
ClipboardQueryItem(), ClipboardRegisterItem(), ClipboardDoneWithItem()

To use the Clipboard, your application must have an Edit menu (or a GenEditControl object) and an object which can implement the Cut, Copy, and Paste operations. This object is often the application's Process object or some other coordinating object. This object must be able to do each of the things in the following list:

Because the Clipboard is constantly in use by many different threads, you must always gain exclusive access to the transfer VM file when you want to use it. After you're done with the transfer file, you should relinquish exclusive access so other threads can continue to use it.

For operations that involve changing the transfer item (cut and copy, for example), you must register your new transfer item with ClipboardRegisterItem() , which also allows other threads to use the file. For operations that involve looking at but not changing the transfer item, you should use ClipboardQueryItem() . Since you have no changes to register, you must later use ClipboardDoneWithItem() to give up your exclusive access to the transfer VM file.


Up: GEOS SDK TechDocs | Up | Down | Prev: 2 Transfer Data Structures | Next: 4 Using Quick-Transfer