IVsHierarchyEvents2.OnItemAdded(UInt32, UInt32, UInt32, Boolean) 方法

定义

向层次结构添加项时通知客户端。

public:
 int OnItemAdded(System::UInt32 itemidParent, System::UInt32 itemidSiblingPrev, System::UInt32 itemidAdded, bool ensureVisible);
public:
 int OnItemAdded(unsigned int itemidParent, unsigned int itemidSiblingPrev, unsigned int itemidAdded, bool ensureVisible);
int OnItemAdded(unsigned int itemidParent, unsigned int itemidSiblingPrev, unsigned int itemidAdded, bool ensureVisible);
public int OnItemAdded (uint itemidParent, uint itemidSiblingPrev, uint itemidAdded, bool ensureVisible);
abstract member OnItemAdded : uint32 * uint32 * uint32 * bool -> int
Public Function OnItemAdded (itemidParent As UInteger, itemidSiblingPrev As UInteger, itemidAdded As UInteger, ensureVisible As Boolean) As Integer

参数

itemidParent
UInt32

中添加项的层次结构的父节点或根节点的标识符。

itemidSiblingPrev
UInt32

中标识符,它指示在父层次结构中,与其他项 (同级) 的添加位置 (itemidParent) 。 如果在同级项的开头添加了新项,则指定的值 VSITEMID_NIL 。 如果在特定节点之后添加项,则指定相关节点的项 Id。

itemidAdded
UInt32

中添加的项的标识符。

ensureVisible
Boolean

指示是否确保节点在添加后可见。 如果 true 为,则节点在添加后可见。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

适用于