ICALabelCollection

[ 
    object, 
    uuid(88C50B51-A622-4555-AB3C-C96EB61C7420), 
    dual, 
    nonextensible, 
    helpstring("ICALabelCollection Interface"), 
    pointer_default(unique) 
] 
interface ICALabelCollection : IDispatch{ 
    [propget, id(1), helpstring("property Count")] HRESULT Count([out, retval] ULONG* pVal); 
    [propget, id(2), helpstring("property Item")] HRESULT Item([in] LONG lIndex, [out, retval] IDispatch** pVal); 
    [id(3), helpstring("method Add")] HRESULT Add([in] IDispatch* pLabelDisp); 
    [id(4), helpstring("method IndexOfByName")] HRESULT IndexOfByName([in] BSTR bstrLabelName, [out,retval] LONG* pnIndex); 
};

ProgID
CyberArticleBook.CALabelCollection
C/C++头文件
CyberArticleBook.h; CyberArticleBook_i.c
 

属性 Count

获得标签数量。只读

参数

类型

  • get: [out, retval] LONG* pVal:返回数量
  • put: 无

属性 Item

获得一个标签。只读

参数

  • [in] LONG nIndex:标签索引。(0 到 Count - 1)

类型

  • get: [out, retval] IDispatch** pVal:返回标签 (ICALabel)
  • put: 无

方法 Add

添加一个标签

参数

  • [in] IDispatch* pDisp:需要添加的标签 (ICALabel)

返回

 

方法 IndexOfByName

通过名称获得标签索引。如果找到,则返回 0 到 Count -1 之间的值。否则返回-1

参数

  • [in] BSTR bstrLabelName:标签名称
  • [in] IDispatch* pDisp:需要添加的标签 (ICALabel)

返回

  • [out,retval] LONG* pnIndex:返回索引。