Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This structure is a generalized clipboard format, enhanced to encompass a target device, the aspect, or view of the data, and a storage medium.
Syntax
typedef struct FARSTRUCT tagFORMATETC { unsigned long cfFormat; DVTARGETDEVICE* ptd; unsigned long dwAspect; long lindex; unsigned long tymed; } FORMATETC, *LPFORMATETC; |
Members
- cfFormat
-
Particular clipboard format of interest.
There are three types of formats recognized by OLE:
- Standard interchange formats, such as CF_TEXT
- Private application formats understood only by the application
offering the format, or by other applications offering similar
features
- OLE formats, which are used to create linked or embedded
objects
- Standard interchange formats, such as CF_TEXT
- ptd
-
Pointer to a DVTARGETDEVICEstructure containing information about the target device for which the data is being composed.
A NULL value is used whenever the specified data format is independent of the target device or when the caller does not care what device is used. In the latter case, if the data requires a target device, the object should pick an appropriate default device (often the display for visual components).
Data obtained from an object with a NULL target device, such as most metafiles, is independent of the target device. The resulting data is usually the same as it would be if the user chose the Save As command from the File menu and selected an interchange format.
- dwAspect
-
Specifies an DVASPECTenumeration constant that indicates how much detail should be contained in the rendering.
A single clipboard format can support multiple aspects or views of the object.
Most data and presentation transfer and caching methods pass aspect information. For example, a caller might request an object's iconic picture, using the metafile clipboard format to retrieve it.
Only one DVASPECTvalue can be used in dwAspect. That is, dwAspectcannot be the result of a BOOLEAN OR operation on several DVASPECTvalues.
- lindex
-
Part of the aspect when the data must be split across page boundaries. The most common value is –1, which identifies all of the data.
For the aspects DVASPECT_THUMBNAIL and DVASPECT_ICON, lindexis ignored.
- tymed
-
One of the TYMEDenumeration constants that indicate the type of storage medium used to transfer the object's data.
Data can be transferred using whatever medium makes sense for the object. For example, data can be passed using global memory, a disk file, or structured storage objects. For more information, see the TYMEDenumeration.
Remarks
The FORMATETCstructure is used by methods in the data transfer and presentation interfaces as a parameter specifying the data being transferred.
The CF_ENHMETAFILE or CF_METAFILEPICT values in the cfFormatmember are not supported.
Requirements
Header | objidl.h |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |