These lines show how to fill a branch of a treeview, so that it looks like the tree in the explorer.
While ShellBrowser.Next do begin if not ShellBrowser.IsFolder then continue; NewNode := TreeView.Items.AddChild(CurrentNode, ShellBrowser.GetShellObjectName); NewNode.ImageIndex := ShellBrowser.IconNumber; NewNode.SelectedIndex := ShellBrowser.SelectedIconNumber; NewNode.HasChildren := ShellBrowser.HasSubFolders; end;