//获得路径
CString strExePath;
TCHAR szFilePath[MAX_PATH + 1];
GetModuleFileName(NULL, szFilePath, MAX_PATH);
strExePath = szFilePath;
unsigned long Length=0;
for (int i=1;i<=strExePath.GetLength();i++)
{
CString temp=strExePath.Right(i);
temp=temp.Left(1);
if (temp==_T("\\"))
{
Length=i;
break;
}
}
strExePath=strExePath.Left(strExePath.GetLength()-Length);