读定配置文件,结合获取主程序所在路径的函数一起使用
void ReadIniStr(CString sec,CString strid,char* text)
{
CString sPath;
GetPrgPath(sPath);
GetPrivateProfileString(sec,strid,"NO text",text,128,sPath);
}
void WriteIniStr(CString sec,CString strid,char* text)//写配置字符串
{
CString sPath;
GetPrgPath(sPath);
WritePrivateProfileString(sec,strid,text,sPath);
}