//帮助文件,返回exe.hlp
CString file = AfxGetApp()->m_pszHelpFilePath;
MessageBox(file);
//可执行方便全路径
GetModuleFileName(NULL, file.GetBufferSetLength(MAX_PATH + 1), MAX_PATH);
MessageBox(file);
//运行目录路径
GetCurrentDirectory(MAX_PATH, file.GetBufferSetLength(MAX_PATH + 1));
MessageBox(file);
转载于:https://www.cnblogs.com/whisht/archive/2011/10/17/4098863.html