aimenkawaz
10-16-2002, 10:31 PM
How to use Tree Control in VC++
aimenkawaz
10-17-2002, 04:32 PM
For example i want to make it view the directories in C:
You can find an example at foosyerdoos (http://www.foosyerdoos.fsnet.co.uk/)
Make sure you also link with "comctl32.lib"
If you want a tree view of your directories so that the users can select one, there is an easyer way.
you can use the commondialog: SHBrowseForFolder()
static LPITEMIDLIST pid1;
BROWSEINFO bi = { hDlg, NULL,NULL,NULL, BIF_RETURNONLYFSDIRS , NULL, 0L, 0};
static char pzsPath[MAX_PATH]; //This will contains the path the usere has selected
//in your WM_COMMAND or where you want to call the dialogbox
pid1 = SHBrowseForFolder(&bi);
if(SHGetPathFromIDList(pid1,pzsPath)==false)
return 0;
//pzsPath will now contain the path the user has selected
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.