最后获取到的strPath就是所在目录了
TCHAR moduleName[MAX_PATH] = {0};
GetModuleFileName(AfxGetInstanceHandle(),moduleName,MAX_PATH);
TCHAR _strLongPath[MAX_PATH] = _T("\0");
::GetLongPathName(moduleName, _strLongPath, MAX_PATH);
CString strPath(_strLongPath);
strPath = strPath.Left(strPath.ReverseFind(_T('\\'))+1);