原型
此参考中所述的 ITfContextRenderingMarkup、IEnumTfRenderingMarkup 和TF_RENDERINGMARKUP未在 IDL 或头文件中定义。 MIDL 编译器需要符合以下原型才能获取头文件。
typedef struct
{
ITfRange *pRange;
TF_DISPLAYATTRIBUTE tfDisplayAttr;
} TF_RENDERINGMARKUP;
//
// IEnumTfRenderingMarkup
//
[
object,
uuid(8c03d21b-95a7-4ba0-ae1b-7fce12a72930),
pointer_default(unique)
]
interface IEnumTfRenderingMarkup : IUnknown
{
HRESULT Clone([out] IEnumTfRenderingMarkup **ppClone);
HRESULT Next([in] ULONG ulCount,
[out, size_is(ulCount), length_is(*pcFetched)] TF_RENDERINGMARKUP *rgMarkup,
[out] ULONG *pcFetched);
HRESULT Reset();
HRESULT Skip([in] ULONG ulCount);
};
//
// ITfContextRenderingMarkup
//
[
object,
uuid(a305b1c0-c776-4523-bda0-7c5a2e0fef10),
pointer_default(unique)
]
interface ITfContextRenderingMarkup : IUnknown
{
const DWORD TF_GRM_INCLUDE_PROPERTY = 0x1;
HRESULT GetRenderingMarkup([in] TfEditCookie ec,
[in] DWORD dwFlags,
[in] ITfRange *pRangeCover,
[out] IEnumTfRenderingMarkup **ppEnum);
HRESULT FindNextRenderingMarkup([in] TfEditCookie ec,
[in] DWORD dwFlags,
[in] ITfRange *pRangeQuery,
[in] TfAnchor tfAnchorQuery,
[out] ITfRange **ppRangeFound,
[out] TF_RENDERINGMARKUP *ptfRenderingMarkup);
};