Board index » cppbuilder » ComboBox showing drives

ComboBox showing drives


2006-08-02 02:13:29 AM
cppbuilder9
How do I set a ComboBox to show system drives ( C, D, E...)?
How do I do: Select a drive (C, for example) in the ComboBox and
automaticaly show in a ListBox all Folders in it.
Select a folder in the ListBox and show in another
ListBox all files in it.
Thanks in advance
Renan
 
 

Re:ComboBox showing drives

"Renan" < XXXX@XXXXX.COM >wrote in message
Quote
How do I set a ComboBox to show system drives ( C, D, E...)?
You can't. ComboBox controls have no concept of that. You will have to
populate the items manually. Look at the GetLocalDrives() or
GetLogicalDriveStrings() function.
Quote
How do I do: Select a drive (C, for example) in the ComboBox
and automaticaly show in a ListBox all Folders in it.
Again, you have to populate the items manually. After selecting an item in
the ComboBox, clear the ListBox and then use the FindFirstFile() and
FindNextFile() functions to loop through the files of the selected drive,
adding them to the ListBox one at a time.
Quote
Select a folder in the ListBox and show in another ListBox
all files in it.
Same thing as above.
Gambit