stdafx.cpp 776 B

123456789101112131415161718192021222324252627
  1. /************************************************************************
  2. * 程序名: 精仿QQ主界面
  3. * 制作人: 李克平, 2011年04月11日
  4. * 版本号: 1.0
  5. ************************************************************************/
  6. // stdafx.cpp : 只包括标准包含文件的源文件
  7. // QQ.pch 将作为预编译头
  8. // stdafx.obj 将包含预编译类型信息
  9. #include "stdafx.h"
  10. void GetAppDir(CString& strAppDir)
  11. {
  12. TCHAR szFullPath[MAX_PATH];
  13. TCHAR szDir[_MAX_DIR];
  14. TCHAR szDrive[_MAX_DRIVE];
  15. // Get application's full path.
  16. ::GetModuleFileName(NULL, szFullPath, MAX_PATH);
  17. // Break full path into seperate components.
  18. _splitpath_s(szFullPath, szDrive,_MAX_DRIVE, szDir,_MAX_DIR, NULL,0, NULL,0);
  19. // Store application's drive and path
  20. strAppDir.Format(_T("%s%s"), szDrive, szDir);
  21. }