다음을 통해 공유


IVsHierarchyEvents2.OnItemAdded(UInt32, UInt32, UInt32, Boolean) Method

Definition

Notifies clients when an item is added to the hierarchy.

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

Parameters

itemidParent
UInt32

[in] Identifier of the parent, or root node of the hierarchy in which the item is added.

itemidSiblingPrev
UInt32

[in] Identifier that indicates where the item is added in relation to other items (siblings) within the parent hierarchy (itemidParent). If the new item is added at the beginning of the sibling items, then a value of VSITEMID_NIL is specified. If the item is added after a particular node, the Item Id of the node in question is specified.

itemidAdded
UInt32

[in] Identifier of the added item.

ensureVisible
Boolean

Indicates whether to make sure the node is visible after it is added. If true, the node is visible after it is added.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Applies to