CSettingsStore Class
This page is specific to:.NET Framework Version:3.54.0
MFC Library Reference
CSettingsStore Class

Wraps Windows API functions, providing an object-oriented interface that you use to access the registry.

class CSettingsStore : public CObject
Members

Public Constructors

Name

Description

CSettingsStore::CSettingsStore

Constructs a CSettingsStore object.

Public Methods

Name

Description

CSettingsStore::Close

Closes the open registry key.

CSettingsStore::CreateKey

Opens the specified key or creates it if it does not exist.

CSettingsStore::DeleteKey

Deletes the specified key and all its children.

CSettingsStore::DeleteValue

Deletes the specified value of the open key.

CSettingsStore::Open

Opens the specified key.

CSettingsStore::Read

Retrieves the data for a specified key value.

CSettingsStore::Write

Writes a value to the registry under the open key.

Remarks

The member functions CreateKey and Open are very similar. If the registry key already exists, CreateKey and Open function in the same way. However, if the registry key does not exist, CreateKey will create it whereas Open will return an error value.

Example

The following example demonstrates how to use the Open and Read methods of the CSettingsStore class. This code snippet is part of the ToolTipDemo Sample: Demonstrates Advanced MFC ToolTip Features.

    CSettingsStore reg (FALSE, TRUE);
    DWORD dwEnableBalloonTips = 1;

    if (reg.Open (_T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced")) &&
        reg.Read (_T("EnableBalloonTips"), dwEnableBalloonTips))
    {
        return dwEnableBalloonTips == 1;
    }


Inheritance Hierarchy

CObject

   CSettingsStore

Requirements

Header: afxsettingsstore.h

See Also

Concepts

Reference

Other Resources

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View