S shuoshuo Unregistered / Unconfirmed GUEST, unregistred user! 2001-01-10 #1 Temp=GetProfileInt(“例子程序”,“项目”,100); 只能读出整数!我想读出“=”后面的字符串怎样做?
D dq Unregistered / Unconfirmed GUEST, unregistred user! 2001-01-10 #2 用GetProfileString。 不过最好用Delphi的TIniFile.ReadString。 查一下帮助。
笑 笑傲江湖 Unregistered / Unconfirmed GUEST, unregistred user! 2001-01-10 #3 DELPHI的TREGISTRY, TINIFILE, TRegIniFile 等 很好地封装了GetPrivateProfileString等WIN API函数 最好用这些东东
D dq Unregistered / Unconfirmed GUEST, unregistred user! 2001-01-10 #5 摘自http://bcbget.myrice.com/vcl/k2.htm—— #include <inifiles.hpp> const String iniFile="blah.ini",iniSection="My Section",iniValue="Memo1"; void __fastcall TForm1::btnLoadClick(TObject *Sender) { TIniFile *ini=new TIniFile(ExtractFilePath(Application->ExeName)+iniFile); Memo1->Lines->CommaText=ini->ReadString(iniSection,iniValue,""); delete ini; } ——我没用过CB
摘自http://bcbget.myrice.com/vcl/k2.htm—— #include <inifiles.hpp> const String iniFile="blah.ini",iniSection="My Section",iniValue="Memo1"; void __fastcall TForm1::btnLoadClick(TObject *Sender) { TIniFile *ini=new TIniFile(ExtractFilePath(Application->ExeName)+iniFile); Memo1->Lines->CommaText=ini->ReadString(iniSection,iniValue,""); delete ini; } ——我没用过CB