https://git.reactos.org/?p=reactos.git;a=commitdiff;h=976d48baeb1a98d620107…
commit 976d48baeb1a98d620107885022b44b24bad77a1
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Sep 14 03:39:18 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Wed Sep 14 03:39:18 2022 +0900
[CPL][INPUT] s/IDI_KEY_SHORT_ICO/IDI_CPLSYSTEM/ and small icon
The task icon of Taskbar was wrong...
---
dll/cpl/input/input.c | 15 ++++++++++++---
dll/cpl/input/input.rc | 2 +-
dll/cpl/input/resource.h | 1 -
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dll/cpl/input/input.c b/dll/cpl/input/input.c
index f169e97c151..b4c292e8b82 100644
--- a/dll/cpl/input/input.c
+++ b/dll/cpl/input/input.c
@@ -39,13 +39,22 @@ static int CALLBACK
PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
{
// NOTE: This callback is needed to set large icon correctly.
- HICON hIcon;
+ // FIXME: Handle leaks
+ HICON hIcon, hIconSmall;
switch (uMsg)
{
case PSCB_INITIALIZED:
{
- hIcon = LoadIconW(hApplet, MAKEINTRESOURCEW(IDI_KEY_SHORT_ICO));
+ hIcon = LoadIconW(hApplet, MAKEINTRESOURCEW(IDI_CPLSYSTEM));
SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
+
+ hIconSmall = (HICON)LoadImageW(hApplet,
+ MAKEINTRESOURCEW(IDI_CPLSYSTEM),
+ IMAGE_ICON,
+ GetSystemMetrics(SM_CXSMICON),
+ GetSystemMetrics(SM_CYSMICON),
+ 0);
+ SendMessageW(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)hIconSmall);
break;
}
}
@@ -65,7 +74,7 @@ SystemApplet(HWND hwnd, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
header.dwFlags = PSH_PROPSHEETPAGE | PSH_USEICONID | PSH_USECALLBACK;
header.hwndParent = hwnd;
header.hInstance = hApplet;
- header.pszIcon = MAKEINTRESOURCEW(IDI_KEY_SHORT_ICO);
+ header.pszIcon = MAKEINTRESOURCEW(IDI_CPLSYSTEM);
header.pszCaption = MAKEINTRESOURCEW(IDS_CPLSYSTEMNAME);
header.nPages = ARRAYSIZE(page);
header.nStartPage = 0;
diff --git a/dll/cpl/input/input.rc b/dll/cpl/input/input.rc
index b9c643cb4f8..706a14cdb62 100644
--- a/dll/cpl/input/input.rc
+++ b/dll/cpl/input/input.rc
@@ -12,7 +12,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_STR_ORIGINAL_FILENAME "input.dll"
#include <reactos/version.rc>
-IDI_KEY_SHORT_ICO ICON "resources/keyboard-shortcuts.ico"
+IDI_CPLSYSTEM ICON "resources/keyboard-shortcuts.ico"
#include <reactos/manifest_hosted.rc>
diff --git a/dll/cpl/input/resource.h b/dll/cpl/input/resource.h
index 3e41eab1ca2..7a76196151b 100644
--- a/dll/cpl/input/resource.h
+++ b/dll/cpl/input/resource.h
@@ -4,7 +4,6 @@
#define IDI_KEYBOARD_ICO 202
#define IDI_MARKER_ICO 205
#define IDI_MIC_ICO 203
-#define IDI_KEY_SHORT_ICO 200
#define IDI_INFO_ICO 207
#define IDI_CPLSYSTEM 1502