diff --git a/src/modules/keyboardmanager/dll/Keyboard.ico b/src/modules/keyboardmanager/dll/Keyboard.ico new file mode 100644 index 0000000000..cc9c2753ee Binary files /dev/null and b/src/modules/keyboardmanager/dll/Keyboard.ico differ diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.rc b/src/modules/keyboardmanager/dll/KeyboardManager.rc index 468391622c..3713d392d1 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.rc +++ b/src/modules/keyboardmanager/dll/KeyboardManager.rc @@ -9,6 +9,7 @@ BEGIN IDS_KEYBOARDMANAGER L"Keyboard Manager" END +IDS_KEYBOARDMANAGER_ICON ICON L"Keyboard.ico" 1 VERSIONINFO FILEVERSION 0,1,0,0 diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj index b307667d50..2983cf7199 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj +++ b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj @@ -132,6 +132,9 @@ + + + diff --git a/src/modules/keyboardmanager/dll/resource.h b/src/modules/keyboardmanager/dll/resource.h index 6fc1962b38..9052e0d098 100644 --- a/src/modules/keyboardmanager/dll/resource.h +++ b/src/modules/keyboardmanager/dll/resource.h @@ -1,2 +1,3 @@ #define IDS_SETTINGS_DESCRIPTION 101 #define IDS_KEYBOARDMANAGER 102 +#define IDS_KEYBOARDMANAGER_ICON 103 diff --git a/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp b/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp index c53ef0cb73..ca9a573e3e 100644 --- a/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp +++ b/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp @@ -9,6 +9,7 @@ #include #include "Styles.h" #include "Dialog.h" +#include using namespace winrt::Windows::Foundation; @@ -145,7 +146,13 @@ void createEditKeyboardWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMan windowClass.hInstance = hInst; windowClass.lpszClassName = szWindowClass; windowClass.hbrBackground = (HBRUSH)(COLOR_WINDOW); - windowClass.hIconSm = LoadIcon(windowClass.hInstance, IDI_APPLICATION); + windowClass.hIcon = (HICON) LoadImageW( + windowClass.hInstance, + MAKEINTRESOURCE(IDS_KEYBOARDMANAGER_ICON), + IMAGE_ICON, + 48, + 48, + LR_DEFAULTCOLOR); if (RegisterClassEx(&windowClass) == NULL) { MessageBox(NULL, L"Windows registration failed!", L"Error", NULL); diff --git a/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp b/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp index 921c588a7e..7afa56617d 100644 --- a/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp +++ b/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp @@ -8,6 +8,7 @@ #include #include "Styles.h" #include "Dialog.h" +#include using namespace winrt::Windows::Foundation; @@ -57,7 +58,13 @@ void createEditShortcutsWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMa windowClass.hInstance = hInst; windowClass.lpszClassName = szWindowClass; windowClass.hbrBackground = (HBRUSH)(COLOR_WINDOW); - windowClass.hIconSm = LoadIcon(windowClass.hInstance, IDI_APPLICATION); + windowClass.hIcon = (HICON)LoadImageW( + windowClass.hInstance, + MAKEINTRESOURCE(IDS_KEYBOARDMANAGER_ICON), + IMAGE_ICON, + 48, + 48, + LR_DEFAULTCOLOR); if (RegisterClassEx(&windowClass) == NULL) { MessageBox(NULL, L"Windows registration failed!", L"Error", NULL);