术语 | CWinApp::WriteProfileInt | ||||||
释义 | CWinApp::WriteProfileInt BOOL WriteProfileInt( LPCTSTR lpszSection, LPCTSTR lpszEntry, int nValue ); 返回值:如果成功,则返回非零值;否则返回0。 参数:
说明: 调用这个成员函数以把指定的值写入应用程序的注册表或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 |
||||||
随便看 |
|
MFC类库中文详解手册包含4274条MFC类库参考词条,基本涵盖了Microsoft基本类库中的类、全局函数、全局变量和宏的内容,是计算机编程的有利工具。