Standard Clipboard-Data Formats

The clipboard can accept data in three standard formats: text, bit map, and metafile. Applications can either use these formats or create their own private formats.

All PM applications can access the clipboard, so applications can copy to the clipboard the same selection of data in many different formats. For example, a word processor that supports multiple fonts might write the same selection of text to the clipboard in three different formats: straight text, rich text, and metafile. Then, another application (pasting from the clipboard) could choose the appropriate format.

Applications can use the following constants to specify the standard clipboard-data formats:

┌───────────────┬─────────────────────────────────────────────┐
│Format         │Description                                  │
├───────────────┼─────────────────────────────────────────────┤
│CF_BITMAP      │Specifies that the data in the clipboard is a│
│               │bit map.                                     │
├───────────────┼─────────────────────────────────────────────┤
│CF_DSPBITMAP   │Specifies that the data in the clipboard is a│
│               │bit map representation of a private-data     │
│               │format.  The clipboard viewer uses this      │
│               │format to display a private format.          │
├───────────────┼─────────────────────────────────────────────┤
│CF_DSPMETAFILE │Specifies that the data in the clipboard is a│
│               │metafile representation of a private-data    │
│               │format.  The clipboard viewer uses this      │
│               │format to display a private format.          │
├───────────────┼─────────────────────────────────────────────┤
│CF_DSPTEXT     │Specifies that the data in the clipboard is a│
│               │text representation of a private-data format.│
│               │The clipboard viewer uses this format to     │
│               │display a private format.                    │
├───────────────┼─────────────────────────────────────────────┤
│CF_METAFILE    │Specifies that the data in the clipboard is a│
│               │metafile.                                    │
├───────────────┼─────────────────────────────────────────────┤
│CF_TEXT        │Specifies that the data in the clipboard is  │
│               │an array of text characters.  These          │
│               │characters can include newline characters to │
│               │indicate line breaks.  The NULL character    │
│               │indicates the end of the text data.          │
└───────────────┴─────────────────────────────────────────────┘


[Back: Paste Operation]
[Next: Private Clipboard-Data Formats]