Okay here is my question.
whenever you desire to download a file from the internet, you have to choose a location to save to. It usually says:
Save; then in a combobox it says; desktop
then below that you have a bunch of choices like:
My Network Places
and so on. When you double click on one of these choices you go to the next level.
Ex. if you double clicked on "My Computer" you have
3 1/2 Floppy (A
and so on. I want this to be my main screen. I would like to just have this window in my VC++ 5.0 application. Could you guide me in writing the code for this. I have already created the template. The little bit of code that I have has come from a tutorial. Here is the code
The first function enables the drop down menu. It gives me 4 choices. I would like to to just start on the desktop.
The next function, if I understand correctly, is the filler where you have your bunch of choices. The tutorial made it so that there are 27 catagories. I would like it to just show the different directories that are available.
//TODO: add you control notification handler code here
//retrieve the index of the seleted item
int nIndex = m_cbMainDir.GetCurSel();
//check the index is valid
if (nIndex != CB_ERR)
//get the text of the selected item and store in a member variable and call functions
//to populate the other controls
//remove all existing tree items
//Allocate an array of HTREEITEMS
//insert items 'A' through 'Z' as root items
for (int nChar = 'A';nChar<='Z';nChar++)
hLetter[nChar - 'A'] = m_treeFiles.InsertItem((TCHAR*)&nChar);
//Insert 'Other' item as a root items
hLetter = m_treeFiles.InsertItem("Other");
int bMoreFiles = 1;
//Find the first file in the main directory
hFind = FindFirstFile(m_strMainDir + "\\*.*", &dataFind);
//countinue to loop until all files have been found
while((hFind != INVALID_HANDLE_VALUE) && (bMoreFiles == 1 ))
//Check a file has been found and not a directory
if (dataFind.dwFileAttributes == FILE_ATTRIBUTE_ARCHIVE)
//Get the first letter of the file name
int nChar = dataFind.cFileName;
//convert lower case letters to uppercase letters
//if the file name start with a letter then subtract 'A' to find the index in
//to the hLetter array, for others use index 26
else nChar =26;
//insert the file name in to the trees
//find the next file in the main directory
bMoreFiles = FindNextFile(hFind, &dataFind);
//close the file handle
I know I have said a great deal, but I was trying to explain what I desired.
Just so you know I am using a VC++ 5.0 compilier, and I have only been working with VC++ for a little over a week.
Thank you very much for your help.