Hi,
I want to build a filepath (C:/programms/games/...) from a filled treeview. How can I do that?
Best regards,
Nordwind64
I want to build a filepath (C:/programms/games/...) from a filled treeview. How can I do that?
Best regards,
Nordwind64
Hi Nordwind64,
You can use Ketil's method of doing it, it is about the best I have seen. He stores the path information in the treeview labels then builds the path using them. To do this you name the root item after the drive then each item in the treeview is the path section. For example...
RootItem = "C:"
Level one = "Program Files"
Level two = "My Proggie"
So to build a path from "My Proggie" you have only to recursively find it's parent and add a backslash (or foreslash).
I believe that Ketil published an example called TreeViewDir somewhere, if you can't find it I used his method in WinExplorer and can send you a copy.
You can use Ketil's method of doing it, it is about the best I have seen. He stores the path information in the treeview labels then builds the path using them. To do this you name the root item after the drive then each item in the treeview is the path section. For example...
RootItem = "C:"
Level one = "Program Files"
Level two = "My Proggie"
So to build a path from "My Proggie" you have only to recursively find it's parent and add a backslash (or foreslash).
I believe that Ketil published an example called TreeViewDir somewhere, if you can't find it I used his method in WinExplorer and can send you a copy.
Hi donkey!
Yes, please. My mailadress is nordwind256@gmx.de
You're the best!
Thanks, Nordwind64
if you can't find it I used his method in WinExplorer and can send you a copy.
Yes, please. My mailadress is nordwind256@gmx.de
You're the best!
Thanks, Nordwind64
Hi, donkey.
No mail comes to me, sorry. But I downloaded the zipfile and try to examine your code. Thank you!
My treeview based on Ewaynes code. Look here:
Somewhat complicated - I think I have to detect "Boot (C:)" for "C:/" e.g. However, thanks!
Best regards,
Nordwind64
No mail comes to me, sorry. But I downloaded the zipfile and try to examine your code. Thank you!
My treeview based on Ewaynes code. Look here:

Somewhat complicated - I think I have to detect "Boot (C:)" for "C:/" e.g. However, thanks!
Best regards,
Nordwind64
I have not seen EWayne's code so I can't really comment on how it works. Generally though, his code is very clear and easy to understand so it should be fairly easy for you to figure out.
Hi,
the solution is very easy! Use an API: SHGetPathFromIDList...
Greetings,
Nordwind64
the solution is very easy! Use an API: SHGetPathFromIDList...
Greetings,
Nordwind64