GEOS SDK TechDocs
|
|
|
2 Transfer Data Structures
|
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:
MSG_META_CLIPBOARD_NOTIFY_NORMAL_TRANSFER_ITEM_CHANGED
and
MSG_META_CLIPBOARD_NOTIFY_TRANSFER_ITEM_FREED
.
MSG_META_CLIPBOARD_COPY,
MSG_META_CLIPBOARD_CUT
When the user issues a Cut or Copy order, the object must put the proper data into the Clipboard Transfer VM File.
MSG_META_CLIPBOARD_PASTE
When the user issues a Paste order, the object must query the Clipboard to ensure a proper format is available and then copy the information from the Clipboard.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.
Registering with the Clipboard
Unregistering with the Clipboard
GEOS SDK TechDocs
|
|
|
2 Transfer Data Structures
|
4 Using Quick-Transfer