From bad4d37e7ac407ceff14033ea9127626f07d9a06 Mon Sep 17 00:00:00 2001 From: dreamforceinc Date: Mon, 28 Feb 2022 20:37:18 +0300 Subject: [PATCH] Some improovements. --- wCenterWindow/Version.h | 5 +++++ wCenterWindow/resource.h | 13 +++++++------ wCenterWindow/wCenterWindow.cpp | 7 +++++++ ...ow.manifest => wCenterWindow.exe.manifest} | 7 +++++++ wCenterWindow/wCenterWindow.rc | Bin 14468 -> 14608 bytes wCenterWindow/wCenterWindow.vcxproj | 3 ++- wCenterWindow/wCenterWindow.vcxproj.filters | 5 ++++- 7 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 wCenterWindow/Version.h rename wCenterWindow/{wCenterWindow.manifest => wCenterWindow.exe.manifest} (66%) diff --git a/wCenterWindow/Version.h b/wCenterWindow/Version.h new file mode 100644 index 0000000..7c6b0a7 --- /dev/null +++ b/wCenterWindow/Version.h @@ -0,0 +1,5 @@ +// wCenterWindow +// +#pragma once +#define NUM_VERSION 2,3,3 +#define STR_VERSION L"2.3.3" diff --git a/wCenterWindow/resource.h b/wCenterWindow/resource.h index 96bfd60..1f65376 100644 --- a/wCenterWindow/resource.h +++ b/wCenterWindow/resource.h @@ -13,12 +13,13 @@ #define ID_POPUPMENU_EXIT 111 #define IDS_ABOUT 112 #define IDS_ERR_MAIN 113 -#define IDS_ERR_WND 114 -#define IDS_ERR_ICON 115 -#define IDS_ERR_MENU 116 -#define IDS_ERR_POPUP 117 -#define IDS_ERR_HOOK 118 -#define IDS_ERR_MAXMIN 119 +#define IDS_ERR_CLASS 114 +#define IDS_ERR_WND 115 +#define IDS_ERR_ICON 116 +#define IDS_ERR_MENU 117 +#define IDS_ERR_POPUP 118 +#define IDS_ERR_HOOK 119 +#define IDS_ERR_MAXMIN 120 #define IDS_RUNNING 121 #define IDR_MAINFRAME 128 #define IDD_MANUAL_EDITING 129 diff --git a/wCenterWindow/wCenterWindow.cpp b/wCenterWindow/wCenterWindow.cpp index b03236f..31c3a83 100644 --- a/wCenterWindow/wCenterWindow.cpp +++ b/wCenterWindow/wCenterWindow.cpp @@ -1,7 +1,9 @@ // wCenterWindow +// wCenterWindow.cpp // #include "framework.h" #include "wCenterWindow.h" +#include "Version.h" #define KEY_I 0x49 #define KEY_C 0x43 @@ -125,6 +127,11 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd wcex.lpszClassName = szClass; wcex.hIconSm = 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); if (!hWnd) diff --git a/wCenterWindow/wCenterWindow.manifest b/wCenterWindow/wCenterWindow.exe.manifest similarity index 66% rename from wCenterWindow/wCenterWindow.manifest rename to wCenterWindow/wCenterWindow.exe.manifest index 32f30ef..49879d2 100644 --- a/wCenterWindow/wCenterWindow.manifest +++ b/wCenterWindow/wCenterWindow.exe.manifest @@ -30,6 +30,13 @@ + + true/PM + PerMonitorV2,PerMonitor + true + SegmentHeap + + diff --git a/wCenterWindow/wCenterWindow.rc b/wCenterWindow/wCenterWindow.rc index 71db1af88827a3bd71e12646872c78251ec49234..d989b1ecff3dafe81c93aa70fb3b96ef27ad593d 100644 GIT binary patch delta 98 zcmZoEoKUnOOKfwF*cx7D9R`ER;wt)Jx?e?dbDYW~UQTBQ9|lK;V20qy4~>mAix^TF u(it)tiWy3PtRe;lhH@Y;k0FI2AIMT*NM^`kNCe6jPd;d*xcP(O6gB`J?HTR> delta 28 kcmbPG)Ka)1ON>!rbEeo@-pNubdYgSzR`G7GF`B{#0GNFW2><{9 diff --git a/wCenterWindow/wCenterWindow.vcxproj b/wCenterWindow/wCenterWindow.vcxproj index 119272c..fc9114d 100644 --- a/wCenterWindow/wCenterWindow.vcxproj +++ b/wCenterWindow/wCenterWindow.vcxproj @@ -161,6 +161,7 @@ + @@ -175,7 +176,7 @@ - + diff --git a/wCenterWindow/wCenterWindow.vcxproj.filters b/wCenterWindow/wCenterWindow.vcxproj.filters index 1a75c91..ffa86fb 100644 --- a/wCenterWindow/wCenterWindow.vcxproj.filters +++ b/wCenterWindow/wCenterWindow.vcxproj.filters @@ -30,6 +30,9 @@ Header Files + + Header Files + @@ -53,7 +56,7 @@ - + Resource Files