KeyboardManager icon (#2875)

This commit is contained in:
Tomas Agustin Raies
2020-05-11 20:13:07 -07:00
committed by GitHub
parent 7551509f41
commit 4dfac02065
6 changed files with 21 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -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

View File

@@ -132,6 +132,9 @@
<ItemGroup>
<ResourceCompile Include="KeyboardManager.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="Keyboard.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@@ -1,2 +1,3 @@
#define IDS_SETTINGS_DESCRIPTION 101
#define IDS_KEYBOARDMANAGER 102
#define IDS_KEYBOARDMANAGER_ICON 103

View File

@@ -9,6 +9,7 @@
#include <common/windows_colors.h>
#include "Styles.h"
#include "Dialog.h"
#include <keyboardmanager/dll/resource.h>
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);

View File

@@ -8,6 +8,7 @@
#include <common/windows_colors.h>
#include "Styles.h"
#include "Dialog.h"
#include <keyboardmanager/dll/resource.h>
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);