From 18d675deb9ecad4cbd0aedda6e8a9de0db5a0700 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Apr 2018 20:44:53 +0300 Subject: TabSRMM: fix for the correct default value of TaskbarSmallIcons --- plugins/TabSRMM/src/taskbar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/TabSRMM/src/taskbar.cpp') diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index 20fe504dfc..3f5cf35289 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -87,23 +87,23 @@ bool CTaskbarInteract::haveLargeIcons() m_fHaveLargeicons = false; if (m_pTaskbarInterface && m_isEnabled) { - HKEY hKey; - DWORD val = 1; - DWORD valGrouping = 2; - DWORD size = 4; - DWORD dwType = REG_DWORD; + DWORD val = 0; + DWORD valGrouping = 2; /* * check whether the taskbar is set to show large icons. This is necessary, because the method SetOverlayIcon() * always returns S_OK, but the icon is simply ignored when using small taskbar icons. * also, figure out the button grouping mode. */ + HKEY hKey; if (::RegOpenKey(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", &hKey) == ERROR_SUCCESS) { + DWORD size = sizeof(val), dwType = REG_DWORD; ::RegQueryValueEx(hKey, L"TaskbarSmallIcons", nullptr, &dwType, (LPBYTE)&val, &size); size = 4; dwType = REG_DWORD; /* * this is the "grouping mode" setting for the task bar. 0 = always combine, no labels */ + size = sizeof(valGrouping); ::RegQueryValueEx(hKey, L"TaskbarGlomLevel", nullptr, &dwType, (LPBYTE)&valGrouping, &size); ::RegCloseKey(hKey); } -- cgit v1.2.3