Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Call this function to retrieve the tree view item that is the child of the item specified by hItem.
HTREEITEM GetChildItem(
HTREEITEM hItem
) const;
Parameters
- hItem
Handle of a tree item.
Return Value
The handle of the child item if successful; otherwise NULL.
Example
HTREEITEM hmyItem = m_TreeCtrl.GetSelectedItem();
// Delete all of the children of hmyItem.
if (m_TreeCtrl.ItemHasChildren(hmyItem))
{
HTREEITEM hNextItem;
HTREEITEM hChildItem = m_TreeCtrl.GetChildItem(hmyItem);
while (hChildItem != NULL)
{
hNextItem = m_TreeCtrl.GetNextItem(hChildItem, TVGN_NEXT);
m_TreeCtrl.DeleteItem(hChildItem);
hChildItem = hNextItem;
}
}
Requirements
Header: afxcmn.h