ReactOS 0.4.16-dev-91-g764881a
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 ()
 
virtual BOOL Save (CRegKey &key)=0
 
virtual BOOL Load (CRegKey &key)=0
 

Private Attributes

INTm_pValueStore
 
LPCWSTR m_RegName
 

Detailed Description

Definition at line 56 of file settings.cpp.

Constructor & Destructor Documentation

◆ SettingsFieldInt()

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

Definition at line 59 of file settings.cpp.

59 : m_pValueStore(pValue), m_RegName(szRegName)
60 {
61 }
INT * m_pValueStore
Definition: settings.cpp:82
LPCWSTR m_RegName
Definition: settings.cpp:83
PWCHAR pValue

Member Function Documentation

◆ Load()

virtual BOOL SettingsFieldInt::Load ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 69 of file settings.cpp.

70 {
71 DWORD dwField;
72 LONG lResult = key.QueryDWORDValue(m_RegName, dwField);
73 if (lResult != ERROR_SUCCESS)
74 {
75 return FALSE;
76 }
77 *m_pValueStore = (INT)dwField;
78 return TRUE;
79 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned long DWORD
Definition: ntddk_ex.h:95
long LONG
Definition: pedump.c:60
#define INT
Definition: polytest.cpp:20
Definition: copy.c:22

◆ Save()

virtual BOOL SettingsFieldInt::Save ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 64 of file settings.cpp.

65 {
66 return key.SetDWORDValue(m_RegName, (DWORD)(*m_pValueStore)) == ERROR_SUCCESS;
67 }

Member Data Documentation

◆ m_pValueStore

INT* SettingsFieldInt::m_pValueStore
private

Definition at line 82 of file settings.cpp.

Referenced by Load(), and Save().

◆ m_RegName

LPCWSTR SettingsFieldInt::m_RegName
private

Definition at line 83 of file settings.cpp.

Referenced by Load(), and Save().


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