- fix typo in registry key name

- fix wrong argument order in SystemParametersInfo call
- use static variables instead of multiple strings
- fix wrong pointer access in sysparams

svn path=/trunk/; revision=43316
This commit is contained in:
Matthias Kupfer 2009-10-07 00:07:30 +00:00
parent 88c42f36e6
commit 54dec94b16
4 changed files with 8 additions and 7 deletions

View file

@ -30,7 +30,7 @@ HKCU,"Control Panel\Desktop","WaitToKillAppTimeout",0x00000002,"20000"
HKCU,"Control Panel\Desktop","Wallpaper",0x00000000,""
HKCU,"Control Panel\Desktop","FontSmoothing",2,"0"
HKCU,"Control Panel\Desktop","SmoothScroll",3,00,00,00,00
HKCU,"Control Panel\Desktop","UserPreferenceMask",3,10,00,00,80
HKCU,"Control Panel\Desktop","UserPreferencesMask",3,10,00,00,80
HKCU,"Control Panel\Desktop","LowPowerActive",,"0"
HKCU,"Control Panel\Desktop","MenuShowDelay",2,"400"
HKCU,"Control Panel\Desktop","WheelScrollLines",2,"3"

View file

@ -30,7 +30,7 @@ HKCU,"Control Panel\Desktop","WaitToKillAppTimeout",0x00000002,"20000"
HKCU,"Control Panel\Desktop","Wallpaper",0x00000000,""
HKCU,"Control Panel\Desktop","FontSmoothing",2,"0"
HKCU,"Control Panel\Desktop","SmoothScroll",3,00,00,00,00
HKCU,"Control Panel\Desktop","UserPreferenceMask",3,10,00,00,80
HKCU,"Control Panel\Desktop","UserPreferencesMask",3,10,00,00,80
HKCU,"Control Panel\Desktop","LowPowerActive",,"0"
HKCU,"Control Panel\Desktop","MenuShowDelay",2,"400"
HKCU,"Control Panel\Desktop","WheelScrollLines",2,"3"

View file

@ -384,9 +384,9 @@ ButtonProc(IN HWND hwndDlg,
//SetDoubleClickTime(pButtonData->g_DoubleClickSpeed);
#if (WINVER >= 0x0500)
SystemParametersInfo(SPI_SETMOUSECLICKLOCK, pButtonData->g_ClickLockEnabled, NULL, SPIF_SENDCHANGE);
SystemParametersInfo(SPI_SETMOUSECLICKLOCK, 0, &pButtonData->g_ClickLockEnabled, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
if (pButtonData->g_ClickLockEnabled)
SystemParametersInfo(SPI_SETMOUSECLICKLOCKTIME, pButtonData->g_ClickLockTime, NULL, SPIF_SENDCHANGE);
SystemParametersInfo(SPI_SETMOUSECLICKLOCKTIME, pButtonData->g_ClickLockTime, NULL, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
#endif
}
else if (lppsn->hdr.code == PSN_RESET)

View file

@ -70,6 +70,7 @@ static const WCHAR* VAL_CLICKLOCKTIME = L"ClickLockTime";
#if (_WIN32_WINNT >= 0x0600)
static const WCHAR* VAL_SCRLLCHARS = L"WheelScrollChars";
#endif
static const WCHAR* VAL_USERPREFMASK = L"UserPreferencesMask";
static const WCHAR* KEY_MDALIGN = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows";
static const WCHAR* VAL_MDALIGN = L"MenuDropAlignment";
@ -515,7 +516,7 @@ UINT_PTR
SpiSetUserPref(DWORD dwMask, PVOID pvValue, FLONG fl)
{
DWORD dwRegMask;
BOOL bValue = pvValue ? 1 : 0;
BOOL bValue = *(BOOL *)pvValue;
REQ_INTERACTIVE_WINSTA(ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION);
@ -527,7 +528,7 @@ SpiSetUserPref(DWORD dwMask, PVOID pvValue, FLONG fl)
{
/* Read current value */
RegReadUserSetting(KEY_DESKTOP,
L"UserPreferencesMask",
VAL_USERPREFMASK,
REG_BINARY,
&dwRegMask,
sizeof(DWORD));
@ -537,7 +538,7 @@ SpiSetUserPref(DWORD dwMask, PVOID pvValue, FLONG fl)
/* write back value */
RegWriteUserSetting(KEY_DESKTOP,
L"UserPreferencesMask",
VAL_USERPREFMASK,
REG_BINARY,
&dwRegMask,
sizeof(DWORD));