I'm using VS 6.0 and MFC and working on creating a FTP client program where my main window has three splitter windows. The first one far to the left uses a TreeView structure and the next two windows over are both ListView structures. The first splitter window (TreeView) should display only local folders on the C: drive which I have set as the default drive when the program starts up. This same window should allow users to navigate around these folders. The middle splitter window is a ListView will displays the contents (folders and files) of the selected or highlighted folder from the TreeView. The far right splitter window displays the folders and files of the remote FTP site.
My delima is two folds. First how do I implement the TreeView splitter window which allows users to navigate the folders and only folders (no files in this view) to sub folders just like Windows explorer of the C:\ drive. I am populating this TreeView window with some code but it does not work in that it does not show the folders correctly once refreshed. I have a drop down combo box (not implemented) which allows users to change the selected drive to the other logical available drives on the system. I have tried writing recursive code for this TreeView window since there are going to be a limited number of recursive calls but my recursive function does not work. I would be happy to paste the preliminary code if it would help. Another words I take the selected node and recurse up the ladder until I reach the top or root node. Once there my function returns and rebuilds the TreeView but only inserting child/parent nodes until we are back to the selected node then at which I want to be able to display all sibling nodes of the one which was selected.
Secondly how do I best inform/call the middle ListView structure once the user selects a folder from the TreeView window ? Can I use custom SendMessage function ? Would this be an elegant method on how to do this ? I had issues compiling when I tried declaring pointers inside the TreeView and ListView pointing to the other class/object. Hence my reason for suggesting SendMessage function.
I am open to any suggestions and advice. I have also attached my entire project for VS6.0.
Code can be found here
Then click on the Download link at the top left.