我不知道如何得到应用程序的当前目录,谢谢各位指点,问题应该很简单,希望能帮助一下!

解决方案 »

  1.   

    GetCurrentDirectoryThe GetCurrentDirectory function retrieves the current directory for the current process.
    DWORD GetCurrentDirectory(
      DWORD nBufferLength,
      LPTSTR lpBuffer
    );Parameters
    nBufferLength 
    [in] Length of the buffer for the current directory string, in TCHARs. The buffer length must include room for a terminating null character. 
    lpBuffer 
    [out] Pointer to the buffer that receives the current directory string. This null-terminated string specifies the absolute path to the current directory. 
      

  2.   

    char szOrgPath[128];
    GetCurrentDirectory(128, szOrgPath); //取得当前的目录
    就得到了,存在szOrgPath中了
      

  3.   

    char m_curDir[_MAX_PATH];CRuixingZJApp *pApp = (CRuixingZJApp *)AfxGetApp();  
    pApp->m_curDir就是结果了
      

  4.   

    1、
    char szPath[MAX_PATH] = "";
    GetCurrentDirectory(MAX_PATH,szPath);
    2、
    GetModuleFileName(MAX_PATH,szPath);
      

  5.   

    GetCurrentDirectory
    楼上都讲得那么清楚了,我就不重复什么了……
    GetSystemDirectory//得到系统目录