Whenever an application exchanges data using the DDE protocol, it must specify the format of the data in the usFormat field of the DDESTRUCT data structure. The system-defined standard format for exchanging text data is DDEFMT_TEXT. Applications can also use constant names to specify the format of data to be exchanged listed in the following table:
┌──────────────────────┬──────────────────────────────────────┐ │Data Format Name │Description │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_BITMAP │Specifies that the data is a bit map. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_CPTEXT │Specifies text whose format is defined│ │ │by a CPTEXT data structure. │ │ │Applications can use this format to │ │ │pass multiple-language strings without│ │ │changing the conversation context. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_DIF │Specifies that the data is in Data │ │ │Image Format (DIF). │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_DSPBITMAP │Specifies that the data is a bit-map │ │ │representation of a private data │ │ │format. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_DSPMETAFILE │Specifies that the data is a metafile │ │ │representation of a private data │ │ │format. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_DSPMETAFILEPICT │Specifies that the data is a metafile │ │ │picture representation of a private │ │ │data format. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_DSPTEXT │Specifies that the data is a text │ │ │representation of a private data │ │ │format. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_LINK │Specifies that the data is in │ │ │link-file format. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_METAFILE │Specifies that the data is a metafile.│ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_METAFILEPICT │Specifies that the data is a metafile │ │ │picture defined by an MFP data │ │ │structure. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_OEMTEXT │Specifies that the data is in OEM Text│ │ │format. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_PALETTE │Specifies that the data is in palette │ │ │format. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_SYLK │Specifies that the data is in │ │ │Synchronous Link format. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_TEXT │Specifies that the data is an array of│ │ │text characters. These characters can │ │ │include new-line characters to │ │ │indicate linebreaks. The zero-length │ │ │character indicates the end of the │ │ │text data. │ ├──────────────────────┼──────────────────────────────────────┤ │SZFMT_TIFF │Specifies that the data is in Tag │ │ │Image File Format (TIFF). │ └──────────────────────┴──────────────────────────────────────┘
Applications can define their own data formats. However, each nonstandard DDE format must have a unique identification number. To receive an identification number for a nonstardard format, the application must register the name of the format in the system atom table. Other applications that have the name of the format can then query the system atom table for the format's identification number. This method ensures that all applications use the same atom to identify a format.