Retrieves the first child item of a specified item.
Type | Description | |||
Item as HITEM | A long expression that indicates the item's handle. | |||
HITEM | A long expression that indicates the handle of the first child item. |
If the ItemChild property gets 0, the item has no child items. Use this property to get the first child of an item. NextVisibleItem or NextSiblingItem to get the next visible, sibling item.
The following snippet of code shows how to recursively scan all child items in the group:
Sub RecItem(ByVal g As EXPLORERTREELibCtl.Group, ByVal h As EXPLORERTREELibCtl.HITEM) If Not (h = 0) Then Dim hChild As HITEM With g.Items Debug.Print .CellCaption(h, 0) hChild = .ItemChild(h) While Not (hChild = 0) RecItem g, hChild hChild = .NextSiblingItem(hChild) Wend End With End If End Sub