网站首页  计算机词典

请输入您要查询的字词:

 

字词 CWinApp::WriteProfileInt
释义 CWinApp::WriteProfileInt

BOOL WriteProfileInt( LPCTSTR lpszSection, LPCTSTR lpszEntry, int nValue );

返回值:如果成功,则返回非零值;否则返回0。

参数:
lpszSection指向一个以null结尾的字符串,指定了包含入口的部分。如果这个部分不存在,就创建它。这个部分的名字对大小写不敏感,字符串可以是大写字符和小写字符的任意组合。
lpszEntry指向一个以null结尾的字符串,指定了包含要写入值的入口的部分。如果在指定的部分中不存在这个入口,就创建它。
nValue包含了要写入的值。

说明:
调用这个成员函数以把指定的值写入应用程序的注册表或INI文件的指定部分。这些入口按如下方式保存:
·在Windows NT中,该值被保存在注册表中。
·在Windows 3.X中,该值被保存在WIN.INI文件中。
·在Windows 95中,该值被保存在WIN.INI的缓存版本中。

示例:
CString strSection = "My Section";
CString strStringItem = "My String Item";
CString strIntItem = "My Int Item";
CWinApp* pApp = AfxGetApp();
pApp->WriteProfileString(strSection, strStringItem, "test");
CString strValue;
strValue = pApp->GetProfileString(strSection, strStringItem);
ASSERT(strValue == "test");
pApp->WriteProfileInt(strSection, strIntItem, 1234);
int nValue;
nValue = pApp->GetProfileInt(strSection, strIntItem, 0);
ASSERT(nValue == 1234);

请参阅:
CWinApp::GetProfileInt, CWinApp::WriteProfileString
随便看

 

计算机英汉双解词典包含34412条计算机术语英汉翻译词条,基本涵盖了全部常用计算机术语的翻译及用法,是计算机学习及翻译工作的有利工具。

 

Copyright © 2021-2025 foosec.com All Rights Reserved
更新时间:2026/10/23 23:39:34