//得到程序的路径(strTemp就是当前项目中.exe的所在目录) CString sPath, strTemp; GetModuleFileName(NULL,sPath.GetBufferSetLength(MAX_PATH+1),MAX_PATH); sPath.ReleaseBuffer(); int nPos = sPath.ReverseFind('\\'); strTemp = sPath.Left(nPos);
原文:http://blog.csdn.net/qq_17242957/article/details/40861461