Need help with Visual C++ multi dialog box

Right now, I have and application that opens a multi file dialog box. I want to take all of the files I highlight when the dialog box shows up and display a messsage box with the path and file names. This is what I have right now:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
private: System::Void button1_Click_1(System::Object^  sender, System::EventArgs^  e) {
				 String^ folderName;
				 Stream^ myStream;
				 OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog;
				 openFileDialog1->Multiselect = true;  

				if ( openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK)
				 {
					 if ((myStream = openFileDialog1->OpenFile()) != nullptr)
					 {

				            String^ strfilename = openFileDialog1->InitialDirectory + openFileDialog1->FileName;
				            MessageBox::Show(strfilename);
					    myStream->Close();
					 }
				 }
				 }

			 }

Currently, it only shows the first file that I choose.
Topic archived. No new replies allowed.