CString sIniPath = this->GetCurPathFromExe();
CString sTmp;//临时保存路径 //读取存储路径
m_cConLog.Init(_T(""),sIniPath + _T("\\config.ini"));//两次设置的目的是为了更新路径
m_sSelectPath = m_cConLog.ReadConfig(_T("FilePath"),_T("LOGPATH")); if (m_sSelectPath == _T(""))
{
m_sSelectPath = this->GetCurPathFromExe();
} //更新路径文本
m_sPthName = m_sSelectPath + CString("\\Log.txt");
UpdateData(FALSE);
m_cConLog.Init(m_sPthName,sIniPath + _T("\\config.ini")); //写入配置文件
m_cConLog.WriteConfig(_T("FilePath"),_T("LOGPATH"),m_sSelectPath);
CString sTmp;//临时保存路径 //读取存储路径
m_cConLog.Init(_T(""),sIniPath + _T("\\config.ini"));//两次设置的目的是为了更新路径
m_sSelectPath = m_cConLog.ReadConfig(_T("FilePath"),_T("LOGPATH")); if (m_sSelectPath == _T(""))
{
m_sSelectPath = this->GetCurPathFromExe();
} //更新路径文本
m_sPthName = m_sSelectPath + CString("\\Log.txt");
UpdateData(FALSE);
m_cConLog.Init(m_sPthName,sIniPath + _T("\\config.ini")); //写入配置文件
m_cConLog.WriteConfig(_T("FilePath"),_T("LOGPATH"),m_sSelectPath);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货