ReactOS  0.4.15-dev-3303-g1ade494
SettingsFieldInt Class Reference
Inheritance diagram for SettingsFieldInt:
Collaboration diagram for SettingsFieldInt:

Public Member Functions

 SettingsFieldInt (INT *pValue, LPCWSTR szRegName)
 
virtual BOOL Save (CRegKey &key) override
 
virtual BOOL Load (CRegKey &key) override
 
- Public Member Functions inherited from SettingsField
virtual ~SettingsField ()
 

Private Attributes

INTm_pValueStore
 
LPCWSTR m_RegName
 

Detailed Description

Definition at line 49 of file settings.cpp.

Constructor & Destructor Documentation

◆ SettingsFieldInt()

SettingsFieldInt::SettingsFieldInt ( INT pValue,
LPCWSTR  szRegName 
)
inline

Definition at line 52 of file settings.cpp.

53  : m_pValueStore(pValue), m_RegName(szRegName)
54  {
55  }
PWCHAR pValue
LPCWSTR m_RegName
Definition: settings.cpp:75
INT * m_pValueStore
Definition: settings.cpp:74

Member Function Documentation

◆ Load()

virtual BOOL SettingsFieldInt::Load ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 61 of file settings.cpp.

62  {
63  DWORD dwField;
64  LONG lResult = key.QueryDWORDValue(m_RegName, dwField);
65  if (lResult != ERROR_SUCCESS)
66  {
67  return FALSE;
68  }
69  *m_pValueStore = (INT)dwField;
70  return TRUE;
71  }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
#define INT
Definition: polytest.cpp:20
LPCWSTR m_RegName
Definition: settings.cpp:75
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
unsigned long DWORD
Definition: ntddk_ex.h:95
INT * m_pValueStore
Definition: settings.cpp:74
Definition: path.c:41

◆ Save()

virtual BOOL SettingsFieldInt::Save ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 57 of file settings.cpp.

58  {
59  return key.SetDWORDValue(m_RegName, (DWORD)(*m_pValueStore)) == ERROR_SUCCESS;
60  }
#define ERROR_SUCCESS
Definition: deptool.c:10
LPCWSTR m_RegName
Definition: settings.cpp:75
unsigned long DWORD
Definition: ntddk_ex.h:95
INT * m_pValueStore
Definition: settings.cpp:74
Definition: path.c:41

Member Data Documentation

◆ m_pValueStore

INT* SettingsFieldInt::m_pValueStore
private

Definition at line 74 of file settings.cpp.

Referenced by Load(), and Save().

◆ m_RegName

LPCWSTR SettingsFieldInt::m_RegName
private

Definition at line 75 of file settings.cpp.

Referenced by Load(), and Save().


The documentation for this class was generated from the following file: