Bootstrap

VC读写INI文件

在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");

转载于:https://www.cnblogs.com/rogee/archive/2011/02/15/1954998.html