在VC中读写INI文件相对比较简单,读INI文件我们只需用到GetPrivateProfileString系统API,而写INI文件也只需用到WritePrivateProfileString系统API,他们的使用例子如下:

CString strCaption;

GetPrivateProfileString("Form",

                       "Caption",

                       "Default Caption",

                       strCaption.GetBuffer(MAX_PATH),

                       MAX_PATH,

                       "./Test.ini");

WritePrivateProfileString("Form",

                         "Caption",

                         "MyCaption",

                         "./Test.ini");

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-30
  • 2021-05-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2021-07-25
相关资源
相似解决方案