ReactOS
0.4.16-dev-319-g6cf4263
settings.cpp
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS browseui
3
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4
* PURPOSE: Stores settings for the file explorer UI.
5
* COPYRIGHT: Copyright 2023 Carl Bialorucki <cbialo2@outlook.com>
6
*/
7
8
#include "
precomp.h
"
9
10
CabinetStateSettings
gCabinetState
;
11
12
void
ShellSettings::Save
()
13
{
14
SHRegSetUSValueW
(
L
"Software\\Microsoft\\Internet Explorer\\Main"
,
L
"StatusBarOther"
,
15
REG_DWORD
, &
fStatusBarVisible
,
sizeof
(
fStatusBarVisible
),
SHREGSET_FORCE_HKCU
);
16
17
SHRegSetUSValueW
(
L
"Software\\Microsoft\\Internet Explorer\\Main"
,
L
"ShowGoButton"
,
18
REG_DWORD
, &
fShowGoButton
,
sizeof
(
fShowGoButton
),
SHREGSET_FORCE_HKCU
);
19
20
SHRegSetUSValueW
(
L
"Software\\Microsoft\\Internet Explorer\\Toolbar"
,
L
"Locked"
,
21
REG_DWORD
, &
fLocked
,
sizeof
(
fLocked
),
SHREGSET_FORCE_HKCU
);
22
}
23
24
void
ShellSettings::Load
()
25
{
26
fStatusBarVisible
=
SHRegGetBoolUSValueW
(
L
"Software\\Microsoft\\Internet Explorer\\Main"
,
27
L
"StatusBarOther"
,
FALSE
,
TRUE
);
28
29
fShowGoButton
=
SHRegGetBoolUSValueW
(
L
"Software\\Microsoft\\Internet Explorer\\Main"
,
30
L
"ShowGoButton"
,
FALSE
,
TRUE
);
31
32
fLocked
=
SHRegGetBoolUSValueW
(
L
"Software\\Microsoft\\Internet Explorer\\Toolbar"
,
33
L
"Locked"
,
FALSE
,
TRUE
);
34
}
35
36
void
CabinetStateSettings::Load
()
37
{
38
this->
cLength
=
sizeof
(
CABINETSTATE
);
39
ReadCabinetState
(
this
, this->
cLength
);
40
41
/* Overrides */
42
fFullPathTitle
=
SHRegGetBoolUSValueW
(
L
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState"
,
43
L
"FullPath"
,
FALSE
,
FALSE
);
44
45
fFullPathAddress
=
SHRegGetBoolUSValueW
(
L
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState"
,
46
L
"FullPathAddress"
,
FALSE
,
TRUE
);
47
}
TRUE
#define TRUE
Definition:
types.h:120
FALSE
#define FALSE
Definition:
types.h:117
gCabinetState
CabinetStateSettings gCabinetState
Definition:
settings.cpp:10
SHRegSetUSValueW
LONG WINAPI SHRegSetUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwType, LPVOID pvData, DWORD cbData, DWORD dwFlags)
Definition:
reg.c:673
SHRegGetBoolUSValueW
BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault)
Definition:
reg.c:770
L
#define L(x)
Definition:
ntvdm.h:50
REG_DWORD
#define REG_DWORD
Definition:
sdbapi.c:596
ReadCabinetState
BOOL WINAPI ReadCabinetState(CABINETSTATE *cs, int length)
Definition:
shellord.c:1806
SHREGSET_FORCE_HKCU
#define SHREGSET_FORCE_HKCU
Definition:
shlwapi.h:312
CABINETSTATE
Definition:
shlobj.h:2384
CABINETSTATE::cLength
WORD cLength
Definition:
shlobj.h:2385
CABINETSTATE::fFullPathTitle
BOOL fFullPathTitle
Definition:
shlobj.h:2387
CabinetStateSettings
Definition:
settings.h:25
CabinetStateSettings::Load
void Load()
Definition:
settings.cpp:36
CabinetStateSettings::fFullPathAddress
BOOL fFullPathAddress
Definition:
settings.h:26
ShellSettings::Save
void Save()
Definition:
settings.cpp:12
ShellSettings::Load
void Load()
Definition:
settings.cpp:24
ShellSettings::fStatusBarVisible
BOOL fStatusBarVisible
Definition:
settings.h:17
ShellSettings::fLocked
BOOL fLocked
Definition:
settings.h:15
ShellSettings::fShowGoButton
BOOL fShowGoButton
Definition:
settings.h:16
precomp.h
dll
win32
browseui
settings.cpp
Generated on Wed Dec 4 2024 06:06:25 for ReactOS by
1.9.6