Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/Nash_Cyk/article/details/79023683
TCHAR Path[ MAX_PATH ] = {0};
if ( GetModuleFileName( NULL, Path,MAX_PATH ) )
{
(_tcsrchr(Path,_T('\\')))[1] = 0;
}
CString strPath = szPath;
CString strPath_ = strPath + L"Config.ini";