Ok, I am working on something that the user selects one of their drives in a combo box, upon comboBox_SelectedIndexChanged , the directorys are added to the the checkedListBox1:
This part works fine,Code:checkedListBox1->Items->AddRange(IO::Directory::GetDirectories(comboBox1->SelectedItem ));
Onto the second part, Once the user checks the directories he wants copying, he presses a button. I have got this button to create a string with the checked directorys shown. (Basically from msdn):
This creates a message box with the selected directories writtenCode:// Determine if there are any items checked. if(checkedListBox1->CheckedItems->Count != 0) { // If so, loop through all checked items and print results. String ^ s = ""; for(int x = 0; x <= checkedListBox1->CheckedItems->Count - 1; x++) { s = String::Concat(s,checkedListBox1->CheckedItems[x]->ToString()); } //Out put selected directories as a message box MessageBox::Show(s);
Example (seen in messagebox):
This example show that the user checked two directories, (Each one starting with a H:\)Code:H:\PS3/EXPORT/BACKUP/200809211826H:\PS3/EXPORT/BACKUP/200806210713
1. Firstly How can I copy directories in VC++ to a specified location? I have found THIS for VisualBasic, but as Im using VC++ its not much use.. Is there an equivalent?
2. How can I use the checked items in a checkedListbox as a source directory for copying, would I have to limit to only one checkbox selectable?
3. Thanks!


Reply With Quote

Bookmarks