GetFormat 方 法

GetFormat 方 法 - 图1GetFormat 方 法 - 图2确定在 OLE 拖放 DataObject 中指定格式的数据是否可用 只在设计时可用

语 法

oDataObjec t .GetFormat( nFormat | cForma t)

参 数 描 述

nFormat | cFormat

GetFormat 方 法 - 图3GetFormat 方 法 - 图4指 定 要 获 取 数 据 的 格 式 下 表 列 出 了 每 种 数 据 格 式 的 值 以 及 说 明

GetFormat 方 法 - 图5GetFormat 方 法 - 图6DataObject 自 动 支 持 下 列 格 式 还 有 其 他 格 式 可 用 但 是 需 要 额 外 的 编

GetFormat 方 法 - 图7GetFormat 方 法 - 图8GetFormat 方 法 - 图9GetFormat 方 法 - 图10GetFormat 方 法 - 图11GetFormat 方 法 - 图12 有 关 可 用 数 据 格 式 的 详 细 内 容 请 在 M icrosoft Developer Network 中查 看 有 关 V isual C++ 的 文 档 通 过 为 指 定 唯 一 的 字 符 串 也 可 以 创 建 自 己 的格 式

数 据 格 式 * nFormat | 说 明

cFormat

CF_TEXT 1 文本格式 .

GetFormat 方 法 - 图13GetFormat 方 法 - 图14CF_OEMTEXT 7 包含 OEM 字符集中字符的文本格式

GetFormat 方 法 - 图15CF_UNICODETEXT 13 Unicode 文本格式 只在

GetFormat 方 法 - 图16Windows NT 下可用

续 表

GetFormat 方 法 - 图17GetFormat 方 法 - 图18CF_FILES or CF_HDROP 15 一个标识一组文件的句柄 例如从 W indows 资源管理器拖来的一组文件

CFSTR_OLEVARIANTARRAY “ OLE Variant

Array ”

一 个 Visual FoxPro 数 组 使用这个格式在一次 拖放 中可以传送多个

GetFormat 方 法 - 图19GetFormat 方 法 - 图20GetFormat 方 法 - 图21值 例如 这 个 格 式 可

GetFormat 方 法 - 图22GetFormat 方 法 - 图23以 用 于 将 列 表 框 中 的一 些 项 拖 动 到 另 一 个列 表 框 中

GetFormat 方 法 - 图24GetFormat 方 法 - 图25CFSTR_OLEVARIANT

“ OLE Varian t” 一 个 Visual FoxPro 变量 Visual FoxPro 中的所有数据类型都可以用变量代表 这个格式可以 用 于 拖 放 Visual FoxPro 数据 并且不丢失数据类型

GetFormat 方 法 - 图26GetFormat 方 法 - 图27CFSTR_VFPSOURCEOBJ

ECT

GetFormat 方 法 - 图28* 在 FOXPRO.H 中定义

说 明

“ VFP Source Objec t”

对一个 Visual FoxPro 对象 的引用

GetFormat 方 法 - 图29GetFormat 方 法 - 图30GetFormat 方 法 - 图31GetFormat 方 法 - 图32GetFormat 方 法 - 图33GetFormat 方 法 - 图34GetFormat 方 法 - 图35如果 DataObject 包含 在 nFormat 或 cFormat 中指定格式的数据 则 GetFormat 方法返回 真 (.T.) 否则 返回 假 (.T.)

应 用 于

DataObject 对 象

请 参 阅

ClearData 方 法 , GetData 方 法 , OLE drag-and-drop 概 览 , SetData 方 法 , SetFormat 方 法