void GetCurrentDirectory(CString &szPath)
{
wchar_t pBuf[256];
GetModuleFileName(NULL,pBuf,sizeof(pBuf)/sizeof(wchar_t));
szPath=pBuf;
szPath = szPath.Left(szPath.ReverseFind('\\')+1);
}
转载于:https://www.cnblogs.com/lartely/archive/2011/03/25/1995135.html