获得文件路径

  CString strPath;

          TCHAR szFull[_MAX_PATH];

          TCHAR szDrive[_MAX_DRIVE];

          TCHAR szDir[_MAX_DIR];

          ::GetModuleFileName(NULL, szFull, sizeof(szFull)/sizeof(TCHAR));

          _tsplitpath(szFull, szDrive, szDir, NULL, NULL);

          _tcscpy(szFull, szDrive);

          _tcscat(szFull, szDir);

          strPath = CString(szFull);

          strPath += "test.264";

原文地址:https://www.cnblogs.com/ouyshy/p/4566198.html