C++ Builder中TOpenDialog控件的使用例子

源代码如下(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]);

        }



    }

你可能感兴趣的:(builder)