网上有个类可以实现,这里有个简单且常有的方法。
strFilePath= "E:/MyDocuments/openFile.txt" ;
ShellExecute(NULL,NULL,_T("explorer"), "/select, "+strFilePath,NULL,SW_SHOW);
ShellExecute(NULL,NULL,_T("explorer"), "/select, "+strFilePath,NULL,SW_SHOW);
网上有个类可以实现,这里有个简单且常有的方法。