Some improovements.

This commit is contained in:
2022-02-28 20:37:18 +03:00
parent fe10e4ec72
commit bad4d37e7a
7 changed files with 32 additions and 8 deletions

5
wCenterWindow/Version.h Normal file
View File

@@ -0,0 +1,5 @@
// wCenterWindow
//
#pragma once
#define NUM_VERSION 2,3,3
#define STR_VERSION L"2.3.3"

View File

@@ -13,12 +13,13 @@
#define ID_POPUPMENU_EXIT 111 #define ID_POPUPMENU_EXIT 111
#define IDS_ABOUT 112 #define IDS_ABOUT 112
#define IDS_ERR_MAIN 113 #define IDS_ERR_MAIN 113
#define IDS_ERR_WND 114 #define IDS_ERR_CLASS 114
#define IDS_ERR_ICON 115 #define IDS_ERR_WND 115
#define IDS_ERR_MENU 116 #define IDS_ERR_ICON 116
#define IDS_ERR_POPUP 117 #define IDS_ERR_MENU 117
#define IDS_ERR_HOOK 118 #define IDS_ERR_POPUP 118
#define IDS_ERR_MAXMIN 119 #define IDS_ERR_HOOK 119
#define IDS_ERR_MAXMIN 120
#define IDS_RUNNING 121 #define IDS_RUNNING 121
#define IDR_MAINFRAME 128 #define IDR_MAINFRAME 128
#define IDD_MANUAL_EDITING 129 #define IDD_MANUAL_EDITING 129

View File

@@ -1,7 +1,9 @@
// wCenterWindow // wCenterWindow
// wCenterWindow.cpp
// //
#include "framework.h" #include "framework.h"
#include "wCenterWindow.h" #include "wCenterWindow.h"
#include "Version.h"
#define KEY_I 0x49 #define KEY_I 0x49
#define KEY_C 0x43 #define KEY_C 0x43
@@ -125,6 +127,11 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
wcex.lpszClassName = szClass; wcex.lpszClassName = szClass;
wcex.hIconSm = wcex.hIcon; wcex.hIconSm = wcex.hIcon;
hIcon = wcex.hIcon; hIcon = wcex.hIcon;
if (!RegisterClassExW(&wcex))
{
ShowError(IDS_ERR_CLASS);
return FALSE;
}
hWnd = CreateWindowExW(0, szClass, szTitle, 0, 0, 0, 0, 0, NULL, NULL, hInstance, NULL); hWnd = CreateWindowExW(0, szClass, szTitle, 0, 0, 0, 0, 0, NULL, NULL, hInstance, NULL);
if (!hWnd) if (!hWnd)

View File

@@ -30,6 +30,13 @@
</application> </application>
</compatibility> </compatibility>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings> <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware> </windowsSettings>
<windowsSettings> <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2,PerMonitor</dpiAwareness> </windowsSettings>
<windowsSettings> <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> </windowsSettings>
<windowsSettings> <heapType xmlns="http://schemas.microsoft.com/SMI/2020/WindowsSettings">SegmentHeap</heapType> </windowsSettings>
</application>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security> <security>
<requestedPrivileges> <requestedPrivileges>

Binary file not shown.

View File

@@ -161,6 +161,7 @@
<ClInclude Include="Logger.h" /> <ClInclude Include="Logger.h" />
<ClInclude Include="Resource.h" /> <ClInclude Include="Resource.h" />
<ClInclude Include="targetver.h" /> <ClInclude Include="targetver.h" />
<ClInclude Include="Version.h" />
<ClInclude Include="wCenterWindow.h" /> <ClInclude Include="wCenterWindow.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -175,7 +176,7 @@
<Image Include="wCenterWindow.ico" /> <Image Include="wCenterWindow.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Manifest Include="wCenterWindow.manifest" /> <Manifest Include="wCenterWindow.exe.manifest" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\README.md" /> <None Include="..\README.md" />

View File

@@ -30,6 +30,9 @@
<ClInclude Include="Logger.h"> <ClInclude Include="Logger.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Version.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="wCenterWindow.cpp"> <ClCompile Include="wCenterWindow.cpp">
@@ -53,7 +56,7 @@
</Image> </Image>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Manifest Include="wCenterWindow.manifest"> <Manifest Include="wCenterWindow.exe.manifest">
<Filter>Resource Files</Filter> <Filter>Resource Files</Filter>
</Manifest> </Manifest>
</ItemGroup> </ItemGroup>