您的位置:首页 > 编程语言 > PHP开发

GetCurrentPath()

2015-07-31 14:21 651 查看
CString GetCurrentPath()

{

TCHAR exeFullPath[MAX_PATH];

GetModuleFileName(NULL,exeFullPath,MAX_PATH);

CString csCurrentPath = exeFullPath;

int pos = csCurrentPath.Find(_T("\\"));

int totalpos;

while(pos != -1)

{

pos++;

totalpos = pos;

pos = csCurrentPath.Find(_T("\\"),pos);

}

csCurrentPath = csCurrentPath.Mid(0,totalpos);

return csCurrentPath;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: