BOOL WriteProfileInt ( LPCTSTR lpszSection, LPCTSTR lpszEntry, int nValue );
戻り値
成功した場合は 0 だ。そうでなければ 0。
パラメーター
lpszSection
エントリを含むセクションを指定します、null で終わる文字列へのポインター。セクションが存在しない場合は、それが作成されます。セクションの名前は独立した場合です。文字列は大文字と小文字があります。
lpszEntry
値に書き込まれるエントリが含まれている null で終わる文字列へのポインター。エントリに指定したセクションが存在しない場合は、それが作成されます。
nValue
書き込まれる値を含む。
解説
アプリケーションのレジストリの指定したセクションに指定した値を記述するにはこのメンバー関数を呼び出しますか。INI ファイル。
エントリは次のとおりに保存されます。:
例
特価;CString strSection =「私」;CString strStringItem =「My 文字列項目」;CString strIntItem =「マイ Int 項目」;CWinApp ※ パップ = AfxGetApp();パップ - > WriteProfileString (strSection、strStringItem、"test");CString strValue;strValue = パップ - > GetProfileString (strSection、strStringItem);ASSERT (strValue =「テスト」);パップ - > WriteProfileInt (strSection、strIntItem、1234年);int nValue;nValue パップ-= > GetProfileInt (strSection、strIntItem、0);ASSERT(nValue == 1234)
CWinApp の概要|nbsp;クラス メンバー |階層図(&N)
参照特価;CWinApp::GetProfileInt、 CWinApp::WriteProfileString、 CWinApp::SetRegistryKey(&N)