我的文件夹这样打开的:
ShellExecute(NULL,"open","C:",NULL,NULL,SW_RESTORE);//打开C盘
如何选定C盘中的“新建文件夹”??
用ShellExecute(NULL,NULL,"explorer","/select,C:\\新建文件夹",NULL,SW_RESTORE);
不行,因为它只能打开C盘并选定“新建文件夹”。如果C盘已经打开,则它不能选定。该如何实现啊~~~~
小弟有急用,请大侠们帮帮忙啊~
ShellExecute(NULL,"open","C:",NULL,NULL,SW_RESTORE);//打开C盘
如何选定C盘中的“新建文件夹”??
用ShellExecute(NULL,NULL,"explorer","/select,C:\\新建文件夹",NULL,SW_RESTORE);
不行,因为它只能打开C盘并选定“新建文件夹”。如果C盘已经打开,则它不能选定。该如何实现啊~~~~
小弟有急用,请大侠们帮帮忙啊~
正常打开该文件夹
CString strParameters,strExplorer;
CString strPath = "C:\\cmd.txt";
strParameters.Format(_T(" /e, /select, %s"), strPath );
TCHAR winFolder[_MAX_PATH];
::GetWindowsDirectory(winFolder, _MAX_PATH);
strExplorer.Format(_T("%s\\explorer.exe"), winFolder);
::ShellExecute(NULL, _T("open"), strExplorer.GetBuffer(MAX_PATH), strParameters.GetBuffer(MAX_PATH), NULL, SW_SHOWNORMAL);