15,979
社区成员
发帖
与我相关
我的任务
分享
static CString GetAppPath()
{
TCHAR szPath[ MAX_PATH ]; // 获取应用程序路径
if (GetModuleFileName(NULL, szPath, MAX_PATH)) // 不等于0表示成功
{
CString AppPath = (CString) szPath;
AppPath = AppPath.Left(AppPath.ReverseFind('\\'));
if (AppPath.Right(1) != "\\")
{
AppPath += "\\";
}
return AppPath;
}
return _T("");
}