char chpath[MAX_PATH];
GetModuleFileName(NULL,(LPWCH)chpath,sizeof(chpath));
CString filename;
filename.Format(_T("%s"), chpath);
filename;//char*转换为CString如此简单
AfxMessageBox(filename);
char chpath[MAX_PATH];
GetModuleFileName(NULL,(LPWCH)chpath,sizeof(chpath));
CString filename;
filename.Format(_T("%s"), chpath);
filename;//char*转换为CString如此简单
AfxMessageBox(filename);