打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
FORMATETC structure (COM)

FORMATETC structure

This topic has not yet been rated - Rate this topic

Represents a generalized clipboard format. It is enhanced to encompass a target device, the aspect or view of the data, and a storage medium indicator. Where one might expect to find a clipboard format, OLE uses a FORMATETC data structure instead. This structure is used as a parameter in OLE functions and methods that require data format information.

Syntax

typedef struct tagFORMATETC {  CLIPFORMAT     cfFormat;  DVTARGETDEVICE *ptd;  DWORD          dwAspect;  LONG           lindex;  DWORD          tymed;} FORMATETC, *LPFORMATETC;

Members

cfFormat

The 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.
ptd

A pointer to a DVTARGETDEVICE structure 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 doesn't 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

Indicates how much detail should be contained in the rendering. This parameter should be one of the DVASPECT enumeration values. 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. Note that only one DVASPECT value can be used in dwAspect. That is, dwAspect cannot be the result of a Boolean OR operation on several DVASPECT values.

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, lindex is ignored.

tymed

One of the TYMED enumeration constants which 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 TYMED enumeration.

Remarks

The FORMATETC structure is used by methods in the data transfer and presentation interfaces as a parameter specifying the data being transferred. For example, the IDataObject::GetData method uses the FORMATETC structure to indicate exactly what kind of data the caller is requesting.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

ObjIdl.h
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
如何将文件拷贝到剪贴板
59.Working with the Clipboard
使用IDropTarget接口同时支持文本和文件拖放
clipboard.js - 将文本复制到剪贴板
教你如何提高手机SD卡读写速度
Geogebra键盘输入快捷键
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服