CString strPath;
GetModuleFileName(NULL,strPath.GetBufferSetLength (MAX_PATH+1),MAX_PATH);
int pos = strPath.ReverseFind('\\');//查找倒数最后一个“\\”符号
strPath = strPath.Left(pos);//strPath只获取exe所在文件夹路径
EXE所在的文件夹的绝对路径
于 2022-03-01 15:52:35 首次发布