Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Reference
Libraries Reference
MFC
Classes
CWinApp Class
Member Functions
 CWinApp::SetRegistryKey
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
MFC Library Reference 
CWinApp::SetRegistryKey 

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

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

Parameters

lpszRegistryKey

Pointer to a string containing the name of the key.

nIDRegistryKey

ID/index of a key in the registry.

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>.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker