ini文件中包含两个部分,section和值,象一下的ini文件中包含:[tablename]
count=4
table1=教育局试验
table2=学校基本情况表
table3=学校教职工情况表
table4=学校名称表读取的时候可以这样做:
Ini_mc := TIniFile.Create(filepath);
count :=StrToInt(Ini_mc.ReadString('tablename','count',''));{读取业务信息表数量}
{添加业务信息至业务选择下拉框}
for i :=1 to count do
begin
s :=Ini_mc.ReadString('tablename','table'+IntToStr(i),'');
if s <> '' then CBxyw.Items.Add(s);
end;
Ini_mc.Free;
count=4
table1=教育局试验
table2=学校基本情况表
table3=学校教职工情况表
table4=学校名称表读取的时候可以这样做:
Ini_mc := TIniFile.Create(filepath);
count :=StrToInt(Ini_mc.ReadString('tablename','count',''));{读取业务信息表数量}
{添加业务信息至业务选择下拉框}
for i :=1 to count do
begin
s :=Ini_mc.ReadString('tablename','table'+IntToStr(i),'');
if s <> '' then CBxyw.Items.Add(s);
end;
Ini_mc.Free;
::GetPrivateProfileString( strSection ,
strKey,
_T("1024"),
m_strFileStartSize.GetBuffer( nMAX ),
nMAX,
strFileName);
m_strFileStartSize.ReleaseBuffer( nMAX );在MSDN查一下GetPrivateProfileString(...)或
WritePrivateProfileString(...)
找出一大堆