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