MFC 路径问题

来源:互联网 发布:淘宝客服兼职 招聘靠 编辑:程序博客网 时间:2024/05/22 00:18

GetModuleFileName(NULL,exeFullPath,MAX_PATH);     //取当前模块(程序)的全名  
 _wsplitpath_s(exeFullPath,Dr,Dpath,File1,File2);     //将名称按盘符、目录、文件名拆分  
 wcscat_s(Dr,Dpath);     //合并盘符、目录
 //exeFullPath
  CString   strPath(Dr);
 int  path_count  =strPath.ReverseFind('//'); 
 strPath= strPath.Left(path_count);
 path_count  =strPath.ReverseFind('//'); 
 strPath= strPath.Left(path_count);

原创粉丝点击