mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 02:16:49 +00:00
[SNDVOL32] Read the Style value from the registry and use it as the default display mode. The /n option is no longer needed.
CORE-15743
This commit is contained in:
parent
45f0d7413c
commit
f6e819fcb8
3 changed files with 37 additions and 10 deletions
|
@ -128,9 +128,9 @@ LoadAndFormatString(IN HINSTANCE hInstance,
|
|||
}
|
||||
|
||||
static const TCHAR AppRegSettings[] = TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Volume Control");
|
||||
//static const TCHAR AppOptionsKey[] = TEXT("Options");
|
||||
static const TCHAR AppOptionsKey[] = TEXT("Options");
|
||||
static const TCHAR LineStatesValue[] = TEXT("LineStates");
|
||||
//static const TCHAR StyleValue[] = TEXT("Style");
|
||||
static const TCHAR StyleValue[] = TEXT("Style");
|
||||
|
||||
HKEY hAppSettingsKey = NULL;
|
||||
|
||||
|
@ -273,3 +273,29 @@ ExitClose:
|
|||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
DWORD
|
||||
GetStyleValue(VOID)
|
||||
{
|
||||
HKEY hOptionsKey;
|
||||
DWORD dwStyle = 0, dwSize;
|
||||
|
||||
if (RegOpenKeyEx(hAppSettingsKey,
|
||||
AppOptionsKey,
|
||||
0,
|
||||
KEY_READ,
|
||||
&hOptionsKey) == ERROR_SUCCESS)
|
||||
{
|
||||
dwSize = sizeof(DWORD);
|
||||
RegQueryValueEx(hOptionsKey,
|
||||
StyleValue,
|
||||
NULL,
|
||||
NULL,
|
||||
(LPBYTE)&dwStyle,
|
||||
&dwSize);
|
||||
|
||||
RegCloseKey(hOptionsKey);
|
||||
}
|
||||
|
||||
return dwStyle;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue