CString CConfig::GetAppPath()
{
TCHAR acPath[260] = {0};
GetModuleFileName(NULL, acPath, 260);
CString strPath = acPath;
int lIndex = strPath.ReverseFind('\\');
if (-1 != lIndex)
{
//数字表示去掉'\'字符后的长度
strPath.Delete(lIndex + 1, (strPath.GetLength() - lIndex) - 1);
}
return strPath;
}
{
TCHAR acPath[260] = {0};
GetModuleFileName(NULL, acPath, 260);
CString strPath = acPath;
int lIndex = strPath.ReverseFind('\\');
if (-1 != lIndex)
{
//数字表示去掉'\'字符后的长度
strPath.Delete(lIndex + 1, (strPath.GetLength() - lIndex) - 1);
}
return strPath;
}