如题。

解决方案 »

  1.   

    CString path,str;
    path=AfxGetApp()->m_pszHelpFilePath;
    str=AfxGetApp()->m_pszExeName;
    path=path.Left(path.GetLength()-str.GetLength()-4); 
    path+=str;
      

  2.   

    TCHAR exeFullPath[256];
    GetModuleFileName(NULL,exeFullPath,256);
      

  3.   

    char szCurPath[200]; memset(szCurPath, 0, 200);
    GetModuleFileName(NULL, szCurPath, sizeof(szCurPath));
      

  4.   

    GetCurrentDirectory
    The GetCurrentDirectory function retrieves the current directory for the current process. DWORD GetCurrentDirectory(
      DWORD nBufferLength,  // size of directory buffer
      LPTSTR lpBuffer       // directory buffer
    );
      

  5.   

    或者
    CString sPath;
    GetModuleFileName(NULL,sPath.GetBufferSetLength (MAX_PATH+1),MAX_PATH);
    sPath.ReleaseBuffer();