5.5.1 Registering Clipboard Formats

A client application registers the clipboard formats it needs by calling the RegisterClipboardFormat function for each format, specifying such formats as Native, OwnerLink, ObjectLink, and any other formats it requires. These registered formats should be stored as global variables visible to all objects, since they are needed to handle object data. For more information on the clipboard formats and their use with OLE, see Chapter 2, "Considerations for OLE Applications."

// Global Variables

OLECLIPFORMATvcfLink;//Supports linked objects

OLECLIPFORMATvcfNative;//Supports Native format

OLECLIPFORMATvcfOwnerLink;//Supports embedded objects

.

.

.

vcfLink = RegisterClipboardFormat ("ObjectLink");

vcfNative = RegisterClipboardFormat ("Native";

vcfOwnerLink = RegisterClipboardFormat("OwnerLink");