[zz]MFC - SetRegistryKey
發現如果你使用注冊表,則它為你提供了很便利的方法,當然如果不使用系統注冊表,這句可以注釋掉
CWinApp::SetRegistryKey
void SetRegistryKey( LPCTSTR lpszRegistryKey );
void SetRegistryKey( UINT nIDRegistryKey );
參數
lpszRegistryKey
字符串指針,包含了鍵的名字。
nIDRegistryKey
注冊表中鍵的ID/索引。
注釋
這個函數將應用程序的設置保存在注冊表而不是INI文件中。這個函數設置m_pszRegistry Key,它被CWinApp的成員函數GetProfileInt,GetProfileString,WriteProfileInt和WriteProfileString使用。如果調用了這個函數,最近使用(MRU)的文件也被保存到注冊表中。通常注冊表的鍵為公司的名字。它保存在如下形式的鍵中:HKEY_CURRENT_USER\Software\<公司名>\<應用程序名>\<section name>\<value name>.
CWinApp::SetRegistryKey
void SetRegistryKey( LPCTSTR lpszRegistryKey );
void SetRegistryKey( UINT nIDRegistryKey );
參數
lpszRegistryKey
字符串指針,包含了鍵的名字。
nIDRegistryKey
注冊表中鍵的ID/索引。
注釋
這個函數將應用程序的設置保存在注冊表而不是INI文件中。這個函數設置m_pszRegistry Key,它被CWinApp的成員函數GetProfileInt,GetProfileString,WriteProfileInt和WriteProfileString使用。如果調用了這個函數,最近使用(MRU)的文件也被保存到注冊表中。通常注冊表的鍵為公司的名字。它保存在如下形式的鍵中:HKEY_CURRENT_USER\Software\<公司名>\<應用程序名>\<section name>\<value name>.
posted on 2009-10-22 20:13 小默 閱讀(1168) 評論(0) 編輯 收藏 引用 所屬分類: Language