NG Drag&Drop Guide


Data Formats


To transfer data between applications the data should be formatted in memory in some standard way to allow different applications understand each other. NG Drag&Drop provides support for most standard and common data formats, used in OLE drag&drop to drag and receive data to/from many Windows applications. This includes text, RTF, HTML, pictures, URLs, files data and more.

 

Typically single drag&drop operation transfer data object, which contain data in several data formats simultaneously. For example, CF_TEXT and CF_UNICODETEXT data are commonly transferred together to support both: Unicode and non-Unicode applications. As well, some formats are specially designed to be used together, like FILEDESCRIPTOR and FILECONTENTS formats, which are used to drag/receive virtual files. Unlike most other libraries, NG Drag&Drop allow to work with formats formally, by providing the possibility to include any combination of data formats into single drag&drop operation.

 

In NG Drag&Drop each data format is represented by a class descendant from TNGDataFormat base class. Following is a list of all built-in data formats:

 

TNGTextFormat

TNGUnicodeTextFormat

TNGBitmapFormat

TNGDibFormat

TNGEnhMetafileFormat

TNGMetafilePictFormat

TNGRtfFormat

TNGHtmlFormat

TNGUrlFormat

TNGHDropFormat

TNGFileDescriptorFormat and TNGFileContentsFormat

 

As well, NG Drag&Drop provides the ability to declare custom data formats. This feature can be used to implement application's private drag&drop formats or to implement missing commonly used formats. To learn about custom data formats please read the Custom Formats section.

 

NG Drag&Drop demo includes a feature to enumerate data formats in currently dragged data object. This feature can be used to learn, which applications supports which data formats.