ReactOS 0.4.16-dev-91-g764881a
SettingsFieldBool Class Reference
Inheritance diagram for SettingsFieldBool:
Collaboration diagram for SettingsFieldBool:

Public Member Functions

 SettingsFieldBool (BOOL *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

BOOLm_pValueStore
 
LPCWSTR m_RegName
 

Detailed Description

Definition at line 26 of file settings.cpp.

Constructor & Destructor Documentation

◆ SettingsFieldBool()

SettingsFieldBool::SettingsFieldBool ( BOOL pValue,
LPCWSTR  szRegName 
)
inline

Definition at line 29 of file settings.cpp.

29 : m_pValueStore(pValue), m_RegName(szRegName)
30 {
31 }
LPCWSTR m_RegName
Definition: settings.cpp:53
BOOL * m_pValueStore
Definition: settings.cpp:52
PWCHAR pValue

Member Function Documentation

◆ Load()

virtual BOOL SettingsFieldBool::Load ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 39 of file settings.cpp.

40 {
41 DWORD dwField;
42 LONG lResult = key.QueryDWORDValue(m_RegName, dwField);
43 if (lResult != ERROR_SUCCESS)
44 {
45 return FALSE;
46 }
47 *m_pValueStore = (BOOL)dwField;
48 return TRUE;
49 }
#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
#define BOOL
Definition: nt_native.h:43
long LONG
Definition: pedump.c:60
Definition: copy.c:22

◆ Save()

virtual BOOL SettingsFieldBool::Save ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 34 of file settings.cpp.

35 {
36 return key.SetDWORDValue(m_RegName, (DWORD)(*m_pValueStore)) == ERROR_SUCCESS;
37 }

Member Data Documentation

◆ m_pValueStore

BOOL* SettingsFieldBool::m_pValueStore
private

Definition at line 52 of file settings.cpp.

Referenced by Load(), and Save().

◆ m_RegName

LPCWSTR SettingsFieldBool::m_RegName
private

Definition at line 53 of file settings.cpp.

Referenced by Load(), and Save().


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