Поделиться через


CTreeCtrl::SortChildren

Call this function to alphabetically sort the child items of the given parent item in a tree view control.

BOOL SortChildren(
   HTREEITEM hItem 
);

Параметры

  • hItem
    Handle of the parent item whose child items are to be sorted. If hItem is NULL, sorting will proceed from the root of the tree.

Возвращаемое значение

Nonzero if successful; otherwise 0.

Заметки

SortChildren will not recurse through the tree; only the immediate children of hItem will be sorted.

Пример

// Sort all of the items in the tree control.
m_TreeCtrl.SortChildren(TVI_ROOT);

Требования

Header: afxcmn.h

См. также

Основные понятия

CTreeCtrl Class

CTreeCtrl Members

Hierarchy Chart

CTreeCtrl::SortChildrenCB