Read / Write INI file
CString cResString;
int value = 0;
// read string
DWORD dwResult = GetPrivateProfileString("section", "key", "return", cResString.GetBuffer(MAX_PATH), MAX_PATH,"Section.ini");
// read integer
value= GetPrivateProfileInt("section", "value", 0, "Section.ini");
// write string
WritePrivateProfileString("section", "key",cResString,"Section.ini");
Section.ini
[section]
key=string
value=100
Ref:
http://support.microsoft.com/kb/90988
標籤: VC++

0 個意見:
張貼留言
訂閱 張貼留言 [Atom]
<< 首頁