...

How to use Tree Control

aimenkawaz
10-16-2002, 09:31 PM
How to use Tree Control in VC++

aimenkawaz
10-17-2002, 03:32 PM
For example i want to make it view the directories in C:

maes
10-18-2002, 02:03 PM
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

aimenkawaz
10-18-2002, 07:29 PM
Thank you very much



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum