BCGSuite for MFC
BOOL CBCGPTreeCtrlEx::SortChildrenCB ( LPTVSORTCB  pSort)

Sorting child items at one level of hierarchy using the callback function.

Call this member function to immediately sort all children of the specified item in the tree control.

Parameters
pSorta pointer to TVSORTCB structure. Where TVSORTCB has the following fields:
  • HTREEITEM hParent: a handle to the parent tree item.
  • PFNTVCOMPARE lpfnCompare: address of an application-defined callback function, which is called during a sort operation each time the relative order of two list items needs to be compared.
  • LPARAM lParam: application-defined value that gets passed as the lParamSort argument in the callback function specified in lpfnCompare.