就像图中那样,在打开某个目录的同时可以选择多个文件。网上查到可以用Explorer.exe /select实现这样的效果,但是我不知道Explorer.exe能不能选择多个文件
//Directory to open
ITEMIDLIST *dir = ILCreateFromPath(_T("C:\\"));
//Items in directory to select
ITEMIDLIST *item1 = ILCreateFromPath(_T("C:\\Program Files\\"));
ITEMIDLIST *item2 = ILCreateFromPath(_T("C:\\Windows\\"));
const ITEMIDLIST* selection[] = {item1,item2};
UINT count = sizeof(selection) / sizeof(ITEMIDLIST);
//Perform selection
SHOpenFolderAndSelectItems(dir, count, selection, 0);
//Free resources
ILFree(dir);
ILFree(item1);
ILFree(item2);
https://stackoverflow.com/questions/9355/programmatically-select-multiple-files-in-windows-explorer