I'm not really sure what your problem is... Try this:
CTreeCtrl *pTree = (CTreeCtrl *)GetDlgItem (IDC_MYTREE);
// Add two root items
HTREEITEM hRootOne = pTree->InsertItem ("Root One", TVI_ROOT);
HTREEITEM hRootTwo = pTree->InsertItem ("Root Two", TVI_ROOT);
// Add one child to first root item
pTree->InsertItem ("Child One", hRootOne);
// Add two children to second root item
pTree->InsertItem ("Child Alpha", hRootTwo);
pTree->InsertItem ("Child Beta", hRootTwo);
Note the use of TVI_ROOT for the root items, and that I keep track of the return values to use later. Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...