Partager via


objets de données et sources de données (OLE)

When you perform a data transfer, either by using the Clipboard or drag and drop, the data has a source and a destination. One application provides the data for copying and another application accepts it for pasting. Each side of the transfer needs to perform different operations on the same data for the transfer to succeed. The Microsoft Foundation Class (MFC) Library provides two classes that represent each side of this transfer:

  • Data sources (as implemented by COleDataSource objects) represent the source side of the data transfer. They are created by the source application when data is to be copied to the Clipboard, or when data is provided for a drag-and-drop operation.

  • Data objects (as implemented by COleDataObject objects) represent the destination side of the data transfer. They are created when the destination application has data dropped into it, or when it is asked to perform a paste operation from the Clipboard.

The following articles explain how to use data objects and data sources in your applications. This information applies to both container and server applications, because both may be called upon to copy and paste data.

Dans cette section

Glisser-déplacer

Presse-papiers

Voir aussi

Référence

COleDataObject, classe

COleDataSource, classe

Concepts

Intégration du format OLE au format MFC