源代码如下(opendlg_loaddata为TOpenDialog控件的name,ofAllowMultiSelect代表允许多选):
opendlg_loaddata->Options << ofAllowMultiSelect << ofFileMustExist; if (opendlg_loaddata->Execute()) { for (int i = 0; i < opendlg_loaddata->Files->Count; i++) { ListBox_filelist->Items->Add(opendlg_loaddata->Files->Strings[i]); } }