如题

解决方案 »

  1.   

    DWORD GetCurrentDirectory(
      DWORD nBufferLength,  // size, in characters, of directory buffer
      LPTSTR lpBuffer       // pointer to buffer for current directory
    );
      

  2.   

    CString  strPathName;
    GetModuleFileName(NULL,strPathName.GetBuffer(256),256);
    strPathName.ReleaseBuffer(256);
    int nPos = strPathName.ReverseFind('\\');
    strPathName = strPathName.Left(nPos + 1);
      

  3.   

    技术上可行
    符合你的要求吗?
    如果不明白,你可以
    (1),给我发短消息(请附帖子的地址).
    (2),根据http://www.vcshare.net上的联系方式与我联系,推荐QQ.
    (3),如果问题简单,请在http://www.vcshare.net/bbs上发帖.
        如果问题比较复杂,请把代码压成*.rar当附件发在我的论坛上发帖.
        同时在www.csdn.net上发帖,并给出在我的论坛的链接.
    ---------------
    压代码前,请先删除debug,release文件夹,及*.opt,*.ncb,*.plg,*.aps.
      

  4.   

    获得程序当前所在路径时,绝对不要用GetCurrentDir,别的程序可以修改当前路径的,你用上面的GetModuleFileName就可以了。