Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

CWinApp::SetRegistryKey

Causes application settings to be stored in the registry instead of INI files.

void SetRegistryKey( 
   LPCTSTR lpszRegistryKey  
); 
void SetRegistryKey( 
   UINT nIDRegistryKey  
);
lpszRegistryKey

Pointer to a string containing the name of the key.

nIDRegistryKey

ID of a string resource containing the name of the registry key.

This function sets m_pszRegistryKey, which is then used by the GetProfileInt, GetProfileString, WriteProfileInt, and WriteProfileString member functions of CWinApp. If this function has been called, the list of most recently-used (MRU) files is also stored in the registry. The registry key is usually the name of a company. It is stored in a key of the following form: HKEY_CURRENT_USER\Software\<company name>\<application name>\<section name>\<value name>.

Header: afxwin.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.