How to implement DirListBox and DriveListBox in Visual C++ ?
-
Hi all, I need a dirlistbox and a drivelistbox in visual c++ dialog or some thing like that, so that user can show a dialog box and chose a directory path from my dialog. Tell me what to do ? thanks in advance.
The following code will enumerate all the files in the current directory.
CFileFind finder; BOOL bWorking = finder.FindFile("*.*"); while (bWorking) { bWorking = finder.FindNextFile(); myListBox.AddString(finder.GetFileName()) }
orUse the method CListBox::Dir
-
Hi all, I need a dirlistbox and a drivelistbox in visual c++ dialog or some thing like that, so that user can show a dialog box and chose a directory path from my dialog. Tell me what to do ? thanks in advance.
Wouldn't using
SHBrowseForFolder()
be easier?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow