Compare commits
66 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cc2e5b5654 | |||
| 1929e3dc4f | |||
| 93ea96bca0 | |||
| 6fb8d35643 | |||
| 7d0e5ee0a7 | |||
| 146208bd03 | |||
| 342c6e3009 | |||
| bcf45417d8 | |||
| 2763bbd12d | |||
| a256184737 | |||
| 2510b74aa1 | |||
| 96940111aa | |||
| bad4d37e7a | |||
| fe10e4ec72 | |||
| 6edbf1f9c6 | |||
| 79acd5d110 | |||
| 4d503f6421 | |||
| dcf844ddd3 | |||
| 517cfdcc82 | |||
| 5c3e15b949 | |||
| 790ae9ab67 | |||
| 52364a228a | |||
|
|
73b91259c8 | ||
| cb01a4b815 | |||
| e15f08d521 | |||
| 28de2585a8 | |||
| 3cd3faea01 | |||
| 19660bb346 | |||
| b332c7476f | |||
| d5b3ef1040 | |||
| 76099356cd | |||
| 750ac44696 | |||
| 0a0fe05555 | |||
| b6a0f9a3c5 | |||
| e7c06ec4b6 | |||
| f58e6a99cb | |||
| b5e040f3d5 | |||
| fee7025323 | |||
|
|
6c9855ab38 | ||
|
|
3f438f6038 | ||
| 7491ed2ca7 | |||
| 166cdd0d88 | |||
| d1ab2b86e2 | |||
| 690f621f5b | |||
| 01eb9075b4 | |||
| 5137eed759 | |||
| b8d3db9289 | |||
| a4af63ed34 | |||
|
|
f394d436cf | ||
|
|
bdb2ebd295 | ||
|
|
bd5d845ec1 | ||
|
|
a6c866d1dd | ||
|
|
38a570310f | ||
|
|
4a96fef1c7 | ||
|
|
0f47ebae9e | ||
| f8b925d0f8 | |||
| 35f791d7a0 | |||
|
|
4586599d2c | ||
| dfdbd6a94b | |||
| 5ef184bee3 | |||
| ce31a7d6e0 | |||
|
|
00a949f502 | ||
|
|
703fccaa15 | ||
| 3f8b848b1e | |||
| 73a7b40f9b | |||
| 81510d5105 |
52
.gitattributes
vendored
52
.gitattributes
vendored
@@ -10,7 +10,7 @@
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
@@ -22,27 +22,27 @@
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
*.sln merge=binary
|
||||
*.csproj merge=binary
|
||||
*.vbproj merge=binary
|
||||
*.vcxproj merge=binary
|
||||
*.vcproj merge=binary
|
||||
*.dbproj merge=binary
|
||||
*.fsproj merge=binary
|
||||
*.lsproj merge=binary
|
||||
*.wixproj merge=binary
|
||||
*.modelproj merge=binary
|
||||
*.sqlproj merge=binary
|
||||
*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
*.jpg binary
|
||||
*.png binary
|
||||
*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
@@ -51,13 +51,13 @@
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
||||
|
||||
182
.gitignore
vendored
182
.gitignore
vendored
@@ -6,6 +6,7 @@
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
[Vv]ersion.h
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
@@ -21,6 +22,7 @@ bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Bb]uild/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
@@ -171,6 +173,9 @@ csx/
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Microsoft Azure ApplicationInsights config file
|
||||
ApplicationInsights.config
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
@@ -187,6 +192,7 @@ _pkginfo.txt
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
.*.swp
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
@@ -256,6 +262,178 @@ paket-files/
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
/windows/LightGBM.VC.db
|
||||
lightgbm
|
||||
|
||||
# Created by https://www.gitignore.io/api/python
|
||||
|
||||
### Python ###
|
||||
!/python-package/lightgbm/
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.pyc
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
#*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
**/coverage.html
|
||||
**/coverage.html.zip
|
||||
R-package/tests/testthat/Rplots.pdf
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
docs/pythonapi/
|
||||
|
||||
# Doxygen documentation
|
||||
docs/doxyoutput/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# dotenv
|
||||
.env
|
||||
|
||||
# virtualenv
|
||||
.venv/
|
||||
venv/
|
||||
ENV/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# R testing artefact
|
||||
lightgbm.model
|
||||
|
||||
# saved or dumped model/data
|
||||
*.model
|
||||
*.pkl
|
||||
*.bin
|
||||
|
||||
# macOS
|
||||
**/.DS_Store
|
||||
|
||||
# VSCode
|
||||
.vscode
|
||||
|
||||
# IntelliJ IDEA
|
||||
.idea/
|
||||
|
||||
# Files from local Python install
|
||||
python-package/LICENSE
|
||||
python-package/build_cpp/
|
||||
python-package/compile/
|
||||
python-package/lightgbm/VERSION.txt
|
||||
|
||||
# R build artefacts
|
||||
R-package/src/CMakeLists.txt
|
||||
R-package/src/lib_lightgbm.so.dSYM/
|
||||
R-package/src/src/
|
||||
lightgbm_r/*
|
||||
lightgbm*.tar.gz
|
||||
lightgbm.Rcheck/
|
||||
|
||||
# Files from interactive R sessions
|
||||
.Rproj.user
|
||||
**/.Rhistory
|
||||
|
||||
# Files generated by aspell
|
||||
**/*.bak
|
||||
|
||||
# GraphViz artifacts
|
||||
*.gv
|
||||
*.gv.*
|
||||
|
||||
24
README.md
24
README.md
@@ -1,2 +1,22 @@
|
||||
# wCenterWindow
|
||||
This program centers the current active window by a 'LCTRL + LWIN + C' hotkey.
|
||||
## wCenterWindow
|
||||
|
||||
This program centers the current active window by a `LCTRL + LWIN + C` hotkey,
|
||||
or pressing `LCTRL + LWIN + MMB` (Middle Mouse Button).
|
||||
|
||||
`LCTRL + LWIN + V` - manual editing of size and position of the window.
|
||||
|
||||
You can use `LCTRL + LWIN + I` hotkey for hide/show trayicon.
|
||||
You can also use commandline option `/hide` for hide trayicon at startup.
|
||||
|
||||
`Use workarea` option means that the window is centered without a taskbar, otherwise, the full resolution of the monitor will be used.
|
||||
|
||||
If some windows does not centers you should run wCenterWindow with administrative rights.
|
||||
|
||||
## Automatic startup
|
||||
|
||||
Usually, to start the application when Windows starts, it is enough to put the application's shortcut in the "Startup" folder -\
|
||||
"C:\Users\[*Your user name*]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup". (The easiest way to get there - press 'WIN + R' and type 'shell:startup').\
|
||||
However, in this case wCenterWindow will not be able to work with windows that are open with elevated privileges.
|
||||
And if you enable the "Run as administrator" option in the shortcut, then wCenterWindow will not start. This is related to the security of Windows (maybe only in 10/11, I did not check).\
|
||||
This behavior can be bypassed by creating a task in the Task Scheduler with the "Run with highest privileges" option.\
|
||||
**Note:** If you run wCenterWindow via the Task Scheduler, I highly recommend enabling the "Delay task for" option for 15-30 seconds, otherwise you may get an error message "Can't create tray icon".
|
||||
|
||||
81
Update_version.bat
Normal file
81
Update_version.bat
Normal file
@@ -0,0 +1,81 @@
|
||||
@ECHO OFF
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
SET CURRENT_TIME=%TIME%
|
||||
SET CURRENT_DATE=%DATE%
|
||||
|
||||
SET BUILDTIME=%CURRENT_TIME:~0,8%
|
||||
SET BUILDDATE=%CURRENT_DATE%
|
||||
SET BUILD_DATETIME=Build time: %BUILDDATE% %BUILDTIME%
|
||||
SET CURRENT_YEAR=%CURRENT_DATE:~6,4%
|
||||
|
||||
SET BUILDSECS=0
|
||||
SET GIT_COUNT=0
|
||||
SET GIT_TIME=0
|
||||
SET GIT_DATE=0
|
||||
SET GIT_DATETIME=0
|
||||
|
||||
SET VerMajor=0
|
||||
SET VerMinor=0
|
||||
SET VerPatch=0
|
||||
|
||||
SET INT_NAME=0
|
||||
SET PN=0
|
||||
SET VS=0
|
||||
SET VSF=0
|
||||
SET PCF=0
|
||||
SET PYS=0
|
||||
SET PA=0
|
||||
|
||||
CD /D %~dp0
|
||||
IF NOT EXIST "VersionInfo.h" (
|
||||
ECHO Can't find file 'VersionInfo.h'
|
||||
TIMEOUT /T 3
|
||||
EXIT /B 1
|
||||
)
|
||||
COPY /Y "VersionInfo.h" "version.h" >nul
|
||||
|
||||
FOR /F "tokens=3" %%A IN ('FINDSTR /I /L /C:"define V_MAJOR" "version.h"') DO (SET "VerMajor=%%A")
|
||||
FOR /F "tokens=3" %%A IN ('FINDSTR /I /L /C:"define V_MINOR" "version.h"') DO (SET "VerMinor=%%A")
|
||||
FOR /F "tokens=3" %%A IN ('FINDSTR /I /L /C:"define V_PATCH" "version.h"') DO (SET "VerPatch=%%A")
|
||||
FOR /F "tokens=3" %%A IN ('FINDSTR /I /L /C:"define PRODUCT_NAME" "version.h"') DO (SET "PN=%%~A")
|
||||
FOR /F "tokens=3" %%A IN ('FINDSTR /I /L /C:"define PRODUCT_YEAR_START" "version.h"') DO (SET "PYS=%%A")
|
||||
FOR /F "tokens=2*" %%A IN ('FINDSTR /I /L /C:"define PRODUCT_AUTHORS" "version.h"') DO (SET "PA=%%~B")
|
||||
FOR /F "tokens=1-4 delims=:., " %%A IN ("%BUILDTIME%") DO (SET /A "BUILDSECS=%%A * 3600 + %%B * 60 + %%C")
|
||||
FOR /F "delims=" %%A IN ('git rev-list --count HEAD') DO (SET /A GIT_COUNT=%%A)
|
||||
FOR /F "tokens=1,2 delims= " %%A IN ('git log -1 --date=format:%%d.%%m.%%Y ^| find /I "Date:"') DO (SET "GIT_DATE=%%B")
|
||||
FOR /F "tokens=2-4 delims=, " %%A IN ('git log -1 --date=format:"%%a,%%d-%%h-%%Y,%%T" ^| find /I "Date:"') DO (
|
||||
SET "GIT_DATETIME=Git time: %%A, %%B %%C"
|
||||
SET "GIT_TIME=%%C"
|
||||
)
|
||||
|
||||
SET VSF=%VerMajor%.%VerMinor%.%VerPatch%.%GIT_COUNT%
|
||||
SET VS=%VerMajor%.%VerMinor%.%VerPatch%
|
||||
SET VNF=%VerMajor%,%VerMinor%,%VerPatch%,%GIT_COUNT%
|
||||
SET VN=%VerMajor%,%VerMinor%,%VerPatch%
|
||||
|
||||
SET PNF=%PN% v%VS% (C++)
|
||||
SET PCF=Copyright (C) %PYS%-%CURRENT_YEAR% by %PA%
|
||||
|
||||
SET INT_NAME=%PN%C++
|
||||
SET ORIG_NAME=%PN%.exe
|
||||
|
||||
ECHO #define BUILD_DATE "%BUILDDATE%">> version.h
|
||||
ECHO #define BUILD_TIME "%BUILDTIME%">> version.h
|
||||
ECHO #define BUILD_DATETIME "%BUILD_DATETIME%">> version.h
|
||||
ECHO #define GIT_DATE "%GIT_DATE%">> version.h
|
||||
ECHO #define GIT_TIME "%GIT_TIME%">> version.h
|
||||
ECHO #define GIT_DATETIME "%GIT_DATETIME%">> version.h
|
||||
ECHO #define GIT_COUNT %GIT_COUNT% >> version.h
|
||||
ECHO #define V_SECS %BUILDSECS% >> version.h
|
||||
ECHO #define INTERNAL_NAME "%INT_NAME%">> version.h
|
||||
ECHO #define ORIG_FILE_NAME "%ORIG_NAME%">> version.h
|
||||
ECHO #define PRODUCT_NAME_FULL "%PNF%">> version.h
|
||||
ECHO #define PRODUCT_COPYRIGHT "%PCF%">> version.h
|
||||
ECHO #define VERSION_NUM %VN% >> version.h
|
||||
ECHO #define VERSION_STR "%VS%">> version.h
|
||||
ECHO #define VERSION_NUM_FULL %VNF% >> version.h
|
||||
ECHO #define VERSION_STR_FULL "%VSF%">> version.h
|
||||
|
||||
ENDLOCAL
|
||||
EXIT
|
||||
12
VersionInfo.h
Normal file
12
VersionInfo.h
Normal file
@@ -0,0 +1,12 @@
|
||||
// wCenterWindow
|
||||
// version.h
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#define V_MAJOR 2
|
||||
#define V_MINOR 3
|
||||
#define V_PATCH 4
|
||||
#define PRODUCT_NAME "wCenterWindow"
|
||||
#define PRODUCT_AUTHORS "W0LF aka 'dreamforce'"
|
||||
#define PRODUCT_YEAR_START 2020
|
||||
#define PRODUCT_DESCRIPTION "Centers windows by hotkey"
|
||||
@@ -1,31 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.1000
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wCenterWindow", "wCenterWindow\wCenterWindow.vcxproj", "{6A775901-6C34-4E96-B359-C11C76A520BB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6A775901-6C34-4E96-B359-C11C76A520BB}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6A775901-6C34-4E96-B359-C11C76A520BB}.Debug|x64.Build.0 = Debug|x64
|
||||
{6A775901-6C34-4E96-B359-C11C76A520BB}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{6A775901-6C34-4E96-B359-C11C76A520BB}.Debug|x86.Build.0 = Debug|Win32
|
||||
{6A775901-6C34-4E96-B359-C11C76A520BB}.Release|x64.ActiveCfg = Release|x64
|
||||
{6A775901-6C34-4E96-B359-C11C76A520BB}.Release|x64.Build.0 = Release|x64
|
||||
{6A775901-6C34-4E96-B359-C11C76A520BB}.Release|x86.ActiveCfg = Release|Win32
|
||||
{6A775901-6C34-4E96-B359-C11C76A520BB}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {CAD0B026-63B6-4645-9B26-22CD0E1049B7}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31112.23
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wCenterWindow", "wCenterWindow\wCenterWindow.vcxproj", "{F1A1603A-F5D0-47B8-8E4B-CF17747BCFBA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F1A1603A-F5D0-47B8-8E4B-CF17747BCFBA}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F1A1603A-F5D0-47B8-8E4B-CF17747BCFBA}.Debug|x64.Build.0 = Debug|x64
|
||||
{F1A1603A-F5D0-47B8-8E4B-CF17747BCFBA}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{F1A1603A-F5D0-47B8-8E4B-CF17747BCFBA}.Debug|x86.Build.0 = Debug|Win32
|
||||
{F1A1603A-F5D0-47B8-8E4B-CF17747BCFBA}.Release|x64.ActiveCfg = Release|x64
|
||||
{F1A1603A-F5D0-47B8-8E4B-CF17747BCFBA}.Release|x64.Build.0 = Release|x64
|
||||
{F1A1603A-F5D0-47B8-8E4B-CF17747BCFBA}.Release|x86.ActiveCfg = Release|Win32
|
||||
{F1A1603A-F5D0-47B8-8E4B-CF17747BCFBA}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {83F3F9B6-B00E-4705-9C92-19308AAC038B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
70
wCenterWindow/Logger.cpp
Normal file
70
wCenterWindow/Logger.cpp
Normal file
@@ -0,0 +1,70 @@
|
||||
// wCenterWindow
|
||||
// Logger.cpp
|
||||
//
|
||||
#include "framework.h"
|
||||
|
||||
#define TS_LEN 30
|
||||
|
||||
std::ofstream logfile;
|
||||
extern WCHAR szTitle[];
|
||||
extern LPVOID szBuffer;
|
||||
|
||||
std::string GetTimeStamp()
|
||||
{
|
||||
SYSTEMTIME lt;
|
||||
GetLocalTime(<);
|
||||
CHAR ts[TS_LEN];
|
||||
StringCchPrintfA(ts, TS_LEN, "%d-%02d-%02d %02d:%02d:%02d.%03d - ", lt.wYear, lt.wMonth, lt.wDay, lt.wHour, lt.wMinute, lt.wSecond, lt.wMilliseconds);
|
||||
return ts;
|
||||
}
|
||||
|
||||
void OpenLogFile()
|
||||
{
|
||||
WCHAR lpszPath[MAX_PATH + 1] = { 0 };
|
||||
DWORD dwPathLength = GetModuleFileNameW(NULL, lpszPath, MAX_PATH);
|
||||
DWORD dwError = GetLastError();
|
||||
if (ERROR_INSUFFICIENT_BUFFER == dwError)
|
||||
{
|
||||
MessageBoxW(NULL, L"Path to logfile is too long! Working without logging", (LPCWSTR)szTitle, MB_OK | MB_ICONWARNING);
|
||||
return;
|
||||
}
|
||||
if (NULL == dwPathLength)
|
||||
{
|
||||
MessageBoxW(NULL, L"Can't get module filename! Working without logging", (LPCWSTR)szTitle, MB_OK | MB_ICONWARNING);
|
||||
return;
|
||||
}
|
||||
|
||||
std::filesystem::path log_path = lpszPath;
|
||||
log_path.replace_extension(L".log");
|
||||
std::filesystem::path bak_path = log_path;
|
||||
bak_path.replace_extension(L".bak");
|
||||
|
||||
if (std::filesystem::exists(log_path)) std::filesystem::rename(log_path, bak_path);
|
||||
|
||||
#ifdef _DEBUG
|
||||
log_path = L"d:\\test.log";
|
||||
#endif
|
||||
|
||||
logfile.open(log_path);
|
||||
if (logfile.is_open())
|
||||
{
|
||||
logfile << std::boolalpha;
|
||||
diag_log("Start logging");
|
||||
diag_log("Logfile: ", log_path);
|
||||
diag_log("Logfile was successfully opened");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBoxW(NULL, L"Can't open logfile! Working without logging", (LPCWSTR)szTitle, MB_OK | MB_ICONWARNING);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void CloseLogFile()
|
||||
{
|
||||
if (logfile)
|
||||
{
|
||||
diag_log("End logging");
|
||||
logfile.close();
|
||||
}
|
||||
}
|
||||
59
wCenterWindow/Logger.h
Normal file
59
wCenterWindow/Logger.h
Normal file
@@ -0,0 +1,59 @@
|
||||
// wCenterWindow
|
||||
// Logger.h
|
||||
//
|
||||
#pragma once
|
||||
#include "framework.h"
|
||||
|
||||
extern std::ofstream logfile;
|
||||
std::string GetTimeStamp();
|
||||
|
||||
template <typename T1>
|
||||
void diag_log(T1 arg1)
|
||||
{
|
||||
logfile << GetTimeStamp() << arg1 << std::endl;
|
||||
}
|
||||
|
||||
template <typename T1, typename T2>
|
||||
void diag_log(T1 arg1, T2 arg2)
|
||||
{
|
||||
logfile << GetTimeStamp() << arg1 << arg2 << std::endl;
|
||||
}
|
||||
|
||||
template <typename T1, typename T2, typename T3>
|
||||
void diag_log(T1 arg1, T2 arg2, T3 arg3)
|
||||
{
|
||||
logfile << GetTimeStamp() << arg1 << arg2 << arg3 << std::endl;
|
||||
}
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
void diag_log(T1 arg1, T2 arg2, T3 arg3, T4 arg4)
|
||||
{
|
||||
logfile << GetTimeStamp() << arg1 << arg2 << arg3 << arg4 << std::endl;
|
||||
}
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
void diag_log(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
|
||||
{
|
||||
logfile << GetTimeStamp() << arg1 << arg2 << arg3 << arg4 << arg5 << std::endl;
|
||||
}
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
|
||||
void diag_log(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
|
||||
{
|
||||
logfile << GetTimeStamp() << arg1 << arg2 << arg3 << arg4 << arg5 << arg6 << std::endl;
|
||||
}
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
|
||||
void diag_log(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
|
||||
{
|
||||
logfile << GetTimeStamp() << arg1 << arg2 << arg3 << arg4 << arg5 << arg6 << arg7 << std::endl;
|
||||
}
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
|
||||
void diag_log(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8)
|
||||
{
|
||||
logfile << GetTimeStamp() << arg1 << arg2 << arg3 << arg4 << arg5 << arg6 << arg7 << arg8 << std::endl;
|
||||
}
|
||||
|
||||
void OpenLogFile();
|
||||
void CloseLogFile();
|
||||
@@ -1,30 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Включаемый файл, созданный в Microsoft Visual C++.
|
||||
// Используется wCenterWindow.rc
|
||||
|
||||
#define IDS_APP_TITLE 103
|
||||
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_WCENTERWINDOW_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDM_ABOUT 104
|
||||
#define IDM_EXIT 105
|
||||
#define IDI_WCENTERWINDOW 107
|
||||
#define IDI_SMALL 108
|
||||
#define IDC_WCENTERWINDOW 109
|
||||
#define IDC_MYICON 2
|
||||
#ifndef IDC_STATIC
|
||||
#define IDC_STATIC -1
|
||||
#endif
|
||||
// Следующие стандартные значения для новых объектов
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#define _APS_NO_MFC 130
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,15 +1,19 @@
|
||||
// header.h: включаемый файл для стандартных системных включаемых файлов
|
||||
// или включаемые файлы для конкретного проекта
|
||||
// wCenterWindow
|
||||
// framework.h
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
#define WIN32_LEAN_AND_MEAN // Исключите редко используемые компоненты из заголовков Windows
|
||||
// Файлы заголовков Windows
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
// Windows Header Files
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <strsafe.h>
|
||||
#include <windows.h>
|
||||
// Файлы заголовков среды выполнения C
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <tchar.h>
|
||||
#include <shellapi.h>
|
||||
#include <CommCtrl.h>
|
||||
|
||||
// Project Specific Header Files
|
||||
#include "Logger.h"
|
||||
|
||||
48
wCenterWindow/resource.h
Normal file
48
wCenterWindow/resource.h
Normal file
@@ -0,0 +1,48 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by wCenterWindow.rc
|
||||
//
|
||||
#define IDS_CLASSNAME 102
|
||||
#define IDS_APP_TITLE 103
|
||||
#define IDD_ABOUTBOX 104
|
||||
#define IDI_TRAYICON 105
|
||||
#define IDR_MENU 106
|
||||
#define ID_POPUPMENU_ICON 107
|
||||
#define ID_POPUPMENU_AREA 108
|
||||
#define ID_POPUPMENU_ABOUT 110
|
||||
#define ID_POPUPMENU_EXIT 111
|
||||
#define IDS_ABOUT 112
|
||||
#define IDS_ERR_MAIN 113
|
||||
#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
|
||||
#define IDC_EDIT_X 1000
|
||||
#define IDC_EDIT_Y 1001
|
||||
#define IDC_EDIT_WIDTH 1002
|
||||
#define IDC_EDIT_HEIGHT 1003
|
||||
#define IDC_EDIT_TITLE 1004
|
||||
#define IDC_EDIT_CLASS 1005
|
||||
#define IDC_BUTTON_SET 1006
|
||||
#define IDC_BUTTON_CLOSE 1007
|
||||
#define IDC_ABOUTHELP 1008
|
||||
#define IDC_DONATIONLINK 1009
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 130
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1010
|
||||
#define _APS_NEXT_SYMED_VALUE 122
|
||||
#endif
|
||||
#endif
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 45 KiB |
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
// // При включении SDKDDKVer.h будет задана самая новая из доступных платформ Windows.
|
||||
// Если вы планируете сборку приложения для предыдущей версии платформы Windows, включите WinSDKVer.h и
|
||||
// задайте желаемую платформу в макросе _WIN32_WINNT, прежде чем включать SDKDDKVer.h.
|
||||
// // Including SDKDDKVer.h defines the highest available Windows platform.
|
||||
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
||||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||
#include <SDKDDKVer.h>
|
||||
|
||||
@@ -1,180 +1,552 @@
|
||||
// wCenterWindow.cpp : Определяет точку входа для приложения.
|
||||
//
|
||||
|
||||
#include "framework.h"
|
||||
#include "wCenterWindow.h"
|
||||
|
||||
#define MAX_LOADSTRING 100
|
||||
|
||||
// Глобальные переменные:
|
||||
HINSTANCE hInst; // текущий экземпляр
|
||||
WCHAR szTitle[MAX_LOADSTRING]; // Текст строки заголовка
|
||||
WCHAR szWindowClass[MAX_LOADSTRING]; // имя класса главного окна
|
||||
|
||||
// Отправить объявления функций, включенных в этот модуль кода:
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance);
|
||||
BOOL InitInstance(HINSTANCE, int);
|
||||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
_In_opt_ HINSTANCE hPrevInstance,
|
||||
_In_ LPWSTR lpCmdLine,
|
||||
_In_ int nCmdShow)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
|
||||
// TODO: Разместите код здесь.
|
||||
|
||||
// Инициализация глобальных строк
|
||||
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
|
||||
LoadStringW(hInstance, IDC_WCENTERWINDOW, szWindowClass, MAX_LOADSTRING);
|
||||
MyRegisterClass(hInstance);
|
||||
|
||||
// Выполнить инициализацию приложения:
|
||||
if (!InitInstance (hInstance, nCmdShow))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WCENTERWINDOW));
|
||||
|
||||
MSG msg;
|
||||
|
||||
// Цикл основного сообщения:
|
||||
while (GetMessage(&msg, nullptr, 0, 0))
|
||||
{
|
||||
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
return (int) msg.wParam;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// ФУНКЦИЯ: MyRegisterClass()
|
||||
//
|
||||
// ЦЕЛЬ: Регистрирует класс окна.
|
||||
//
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance)
|
||||
{
|
||||
WNDCLASSEXW wcex;
|
||||
|
||||
wcex.cbSize = sizeof(WNDCLASSEX);
|
||||
|
||||
wcex.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wcex.lpfnWndProc = WndProc;
|
||||
wcex.cbClsExtra = 0;
|
||||
wcex.cbWndExtra = 0;
|
||||
wcex.hInstance = hInstance;
|
||||
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WCENTERWINDOW));
|
||||
wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
|
||||
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
|
||||
wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WCENTERWINDOW);
|
||||
wcex.lpszClassName = szWindowClass;
|
||||
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
|
||||
|
||||
return RegisterClassExW(&wcex);
|
||||
}
|
||||
|
||||
//
|
||||
// ФУНКЦИЯ: InitInstance(HINSTANCE, int)
|
||||
//
|
||||
// ЦЕЛЬ: Сохраняет маркер экземпляра и создает главное окно
|
||||
//
|
||||
// КОММЕНТАРИИ:
|
||||
//
|
||||
// В этой функции маркер экземпляра сохраняется в глобальной переменной, а также
|
||||
// создается и выводится главное окно программы.
|
||||
//
|
||||
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
{
|
||||
hInst = hInstance; // Сохранить маркер экземпляра в глобальной переменной
|
||||
|
||||
HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);
|
||||
|
||||
if (!hWnd)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
UpdateWindow(hWnd);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//
|
||||
// ФУНКЦИЯ: WndProc(HWND, UINT, WPARAM, LPARAM)
|
||||
//
|
||||
// ЦЕЛЬ: Обрабатывает сообщения в главном окне.
|
||||
//
|
||||
// WM_COMMAND - обработать меню приложения
|
||||
// WM_PAINT - Отрисовка главного окна
|
||||
// WM_DESTROY - отправить сообщение о выходе и вернуться
|
||||
//
|
||||
//
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
{
|
||||
int wmId = LOWORD(wParam);
|
||||
// Разобрать выбор в меню:
|
||||
switch (wmId)
|
||||
{
|
||||
case IDM_ABOUT:
|
||||
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
|
||||
break;
|
||||
case IDM_EXIT:
|
||||
DestroyWindow(hWnd);
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc = BeginPaint(hWnd, &ps);
|
||||
// TODO: Добавьте сюда любой код прорисовки, использующий HDC...
|
||||
EndPaint(hWnd, &ps);
|
||||
}
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Обработчик сообщений для окна "О программе".
|
||||
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(lParam);
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
return (INT_PTR)TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
|
||||
{
|
||||
EndDialog(hDlg, LOWORD(wParam));
|
||||
return (INT_PTR)TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return (INT_PTR)FALSE;
|
||||
}
|
||||
// wCenterWindow
|
||||
// wCenterWindow.cpp
|
||||
//
|
||||
#include "framework.h"
|
||||
#include "wCenterWindow.h"
|
||||
|
||||
#define KEY_I 0x49
|
||||
#define KEY_C 0x43
|
||||
#define KEY_V 0x56
|
||||
|
||||
#define BUF_LEN 1024
|
||||
#define MAX_LOADSTRING 50
|
||||
#define WM_WCW 0x8F00
|
||||
|
||||
// Global variables:
|
||||
HINSTANCE hInst; // Instance
|
||||
WCHAR szTitle[MAX_LOADSTRING]; // Window's title
|
||||
WCHAR szClass[MAX_LOADSTRING]; // Window's class
|
||||
WCHAR szAbout[MAX_LOADSTRING * 12]; // Description text
|
||||
WCHAR szWinTitle[256];
|
||||
WCHAR szWinClass[256];
|
||||
WCHAR szWinCore[] = L"Windows.UI.Core.CoreWindow";
|
||||
WCHAR szWorkerW[] = L"WorkerW";
|
||||
HANDLE hHeap = NULL;
|
||||
HHOOK hMouseHook = NULL, hKbdHook = NULL; // Hook's handles
|
||||
HICON hIcon = NULL;
|
||||
HMENU hMenu = NULL, hPopup = NULL;
|
||||
HWND hWnd = NULL, hFgWnd = NULL, hTaskBar = NULL, hDesktop = NULL, hProgman = NULL;
|
||||
bool bKPressed = FALSE, bMPressed = FALSE, bShowIcon = TRUE, bWorkArea = TRUE;
|
||||
bool bLCTRL = FALSE, bLWIN = FALSE, bKEYV = FALSE;
|
||||
|
||||
RECT rcFW = { 0 };
|
||||
NOTIFYICONDATAW nid = { 0 };
|
||||
LPKBDLLHOOKSTRUCT pkhs = { 0 };
|
||||
MENUITEMINFO mii = { 0 };
|
||||
|
||||
LPVOID szBuffer;
|
||||
|
||||
// {2D7B7F30-4B5F-4380-9807-57D7A2E37F6C}
|
||||
static const GUID guid = { 0x2d7b7f30, 0x4b5f, 0x4380, { 0x98, 0x7, 0x57, 0xd7, 0xa2, 0xe3, 0x7f, 0x6c } };
|
||||
|
||||
// Forward declarations of functions included in this code module:
|
||||
VOID HandlingTrayIcon();
|
||||
VOID ShowError(UINT);
|
||||
bool IsWindowApprooved(HWND);
|
||||
BOOL CALLBACK DlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
LRESULT CALLBACK KeyboardHookProc(int, WPARAM, LPARAM);
|
||||
LRESULT CALLBACK MouseHookProc(int, WPARAM, LPARAM);
|
||||
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
|
||||
std::string ConvertWideToUtf8(const std::wstring&);
|
||||
|
||||
|
||||
|
||||
VOID MoveWindowToMonitorCenter(HWND hwnd, BOOL bWorkArea, BOOL bResize)
|
||||
{
|
||||
diag_log("Entering MoveWindowToMonitorCenter(), handle = 0x", hwnd);
|
||||
|
||||
RECT fgwrc = { 0 };
|
||||
GetWindowRect(hwnd, &fgwrc);
|
||||
LONG nWidth = fgwrc.right - fgwrc.left;
|
||||
LONG nHeight = fgwrc.bottom - fgwrc.top;
|
||||
|
||||
diag_log("Moving window from x = ", fgwrc.left, ", y = ", fgwrc.top);
|
||||
|
||||
MONITORINFO mi = { 0 };
|
||||
mi.cbSize = sizeof(MONITORINFO);
|
||||
GetMonitorInfoW(MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST), &mi);
|
||||
RECT area = { 0 };
|
||||
if (bWorkArea)
|
||||
{
|
||||
area.bottom = mi.rcWork.bottom;
|
||||
area.left = mi.rcWork.left;
|
||||
area.right = mi.rcWork.right;
|
||||
area.top = mi.rcWork.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
area.bottom = mi.rcMonitor.bottom;
|
||||
area.left = mi.rcMonitor.left;
|
||||
area.right = mi.rcMonitor.right;
|
||||
area.top = mi.rcMonitor.top;
|
||||
}
|
||||
|
||||
int aw = area.right - area.left;
|
||||
int ah = area.bottom - area.top;
|
||||
if (nWidth > aw && bResize) nWidth = aw;
|
||||
if (nHeight > ah && bResize) nHeight = ah;
|
||||
if (area.left < 0) aw = -aw;
|
||||
if (area.top < 0) ah = -ah;
|
||||
int x = (aw - nWidth) / 2;
|
||||
int y = (ah - nHeight) / 2;
|
||||
|
||||
SendMessageW(hwnd, WM_ENTERSIZEMOVE, NULL, NULL);
|
||||
MoveWindow(hwnd, x, y, nWidth, nHeight, TRUE);
|
||||
SendMessageW(hwnd, WM_EXITSIZEMOVE, NULL, NULL);
|
||||
|
||||
diag_log("Moving window to x = ", x, ", y = ", y);
|
||||
diag_log("Quiting MoveWindowToMonitorCenter()");
|
||||
}
|
||||
|
||||
|
||||
|
||||
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
hInst = hInstance;
|
||||
|
||||
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, _countof(szTitle));
|
||||
LoadStringW(hInstance, IDS_CLASSNAME, szClass, _countof(szClass));
|
||||
|
||||
if (FindWindowW(szClass, NULL))
|
||||
{
|
||||
ShowError(IDS_RUNNING);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
OpenLogFile();
|
||||
diag_log("Entering WinMain()");
|
||||
|
||||
WNDCLASSEX wcex = { 0 };
|
||||
wcex.cbSize = sizeof(WNDCLASSEX);
|
||||
wcex.lpfnWndProc = WndProc;
|
||||
wcex.hInstance = hInstance;
|
||||
wcex.hIcon = LoadIconW(hInstance, MAKEINTRESOURCE(IDI_TRAYICON));
|
||||
wcex.hCursor = LoadCursorW(nullptr, IDC_ARROW);
|
||||
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)
|
||||
{
|
||||
ShowError(IDS_ERR_WND);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int nArgs = 0;
|
||||
LPWSTR* szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
|
||||
std::string arg;
|
||||
|
||||
diag_log("Arguments: ", nArgs - 1);
|
||||
for (int i = 1; i < nArgs; i++)
|
||||
{
|
||||
arg = ConvertWideToUtf8(szArglist[i]);
|
||||
diag_log("Argument #", i, ": ", arg);
|
||||
}
|
||||
|
||||
(nArgs >= 2 && 0 == lstrcmpiW(szArglist[1], L"/hide")) ? bShowIcon = FALSE : bShowIcon = TRUE;
|
||||
LocalFree(szArglist);
|
||||
HandlingTrayIcon();
|
||||
|
||||
hHeap = GetProcessHeap();
|
||||
szBuffer = HeapAlloc(hHeap, HEAP_ZERO_MEMORY, BUF_LEN);
|
||||
|
||||
hTaskBar = FindWindowW(L"Shell_TrayWnd", NULL);
|
||||
hProgman = FindWindowW(L"Progman", NULL);
|
||||
hDesktop = GetDesktopWindow();
|
||||
|
||||
MSG msg;
|
||||
BOOL bRet;
|
||||
|
||||
while ((bRet = GetMessageW(&msg, NULL, 0, 0)) != 0)
|
||||
{
|
||||
if (bRet == -1)
|
||||
{
|
||||
ShowError(IDS_ERR_MAIN);
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessageW(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
if (hMouseHook) UnhookWindowsHookEx(hMouseHook);
|
||||
if (hKbdHook) UnhookWindowsHookEx(hKbdHook);
|
||||
if (hMenu) DestroyMenu(hMenu);
|
||||
Shell_NotifyIconW(NIM_DELETE, &nid);
|
||||
|
||||
diag_log("Quiting WinMain(), msg.wParam = ", (int)msg.wParam);
|
||||
CloseLogFile();
|
||||
HeapFree(hHeap, NULL, szBuffer);
|
||||
|
||||
return (int)msg.wParam;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
{
|
||||
diag_log("Recived WM_CREATE message");
|
||||
hMenu = LoadMenuW(hInst, MAKEINTRESOURCE(IDR_MENU));
|
||||
if (!hMenu)
|
||||
{
|
||||
diag_log("Loading context menu failed!");
|
||||
ShowError(IDS_ERR_MENU);
|
||||
PostMessageW(hWnd, WM_CLOSE, NULL, NULL);
|
||||
}
|
||||
diag_log("Context menu successfully loaded");
|
||||
|
||||
hPopup = GetSubMenu(hMenu, 0);
|
||||
if (!hPopup)
|
||||
{
|
||||
diag_log("Creating popup menu failed!");
|
||||
ShowError(IDS_ERR_POPUP);
|
||||
PostMessageW(hWnd, WM_CLOSE, NULL, NULL);
|
||||
}
|
||||
diag_log("Popup menu successfully created");
|
||||
|
||||
mii.cbSize = sizeof(MENUITEMINFO);
|
||||
mii.fMask = MIIM_STATE;
|
||||
bWorkArea ? mii.fState = MFS_CHECKED : mii.fState = MFS_UNCHECKED;
|
||||
SetMenuItemInfoW(hPopup, ID_POPUPMENU_AREA, FALSE, &mii);
|
||||
|
||||
nid.cbSize = sizeof(NOTIFYICONDATAW);
|
||||
nid.hWnd = hWnd;
|
||||
nid.uVersion = NOTIFYICON_VERSION;
|
||||
nid.uCallbackMessage = WM_WCW;
|
||||
nid.hIcon = hIcon;
|
||||
nid.uID = IDI_TRAYICON;
|
||||
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
|
||||
nid.dwInfoFlags = NIIF_NONE;
|
||||
nid.dwState = NIS_HIDDEN;
|
||||
nid.dwStateMask = NIS_HIDDEN;
|
||||
StringCchCopyW(nid.szTip, _countof(nid.szTip), szTitle);
|
||||
|
||||
#ifndef _DEBUG
|
||||
hMouseHook = SetWindowsHookExW(WH_MOUSE_LL, MouseHookProc, hInst, NULL);
|
||||
if (!hMouseHook)
|
||||
{
|
||||
diag_log("Creating mouse hook failed!");
|
||||
ShowError(IDS_ERR_HOOK);
|
||||
PostMessageW(hWnd, WM_CLOSE, NULL, NULL);
|
||||
}
|
||||
diag_log("Mouse hook was successfully set");
|
||||
#endif // !_DEBUG
|
||||
|
||||
hKbdHook = SetWindowsHookExW(WH_KEYBOARD_LL, KeyboardHookProc, hInst, NULL);
|
||||
if (!hKbdHook)
|
||||
{
|
||||
diag_log("Creating keyboard hook failed!");
|
||||
ShowError(IDS_ERR_HOOK);
|
||||
PostMessageW(hWnd, WM_CLOSE, NULL, NULL);
|
||||
}
|
||||
diag_log("Keyboard hook was successfully set");
|
||||
|
||||
LoadStringW(hInst, IDS_ABOUT, szAbout, _countof(szAbout));
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_WCW:
|
||||
{
|
||||
if (IDI_TRAYICON == wParam && (WM_RBUTTONDOWN == lParam || WM_LBUTTONDOWN == lParam))
|
||||
{
|
||||
diag_log("Entering menu handler");
|
||||
SetForegroundWindow(hWnd);
|
||||
POINT pt;
|
||||
GetCursorPos(&pt);
|
||||
int idMenu = TrackPopupMenu(hPopup, TPM_RETURNCMD, pt.x, pt.y, 0, hWnd, NULL);
|
||||
if (ID_POPUPMENU_ICON == idMenu)
|
||||
{
|
||||
diag_log("Pressed 'Hide icon' menuitem");
|
||||
bShowIcon = FALSE;
|
||||
HandlingTrayIcon();
|
||||
}
|
||||
if (ID_POPUPMENU_AREA == idMenu)
|
||||
{
|
||||
diag_log("Pressed 'Use workarea' menuitem");
|
||||
bWorkArea = !bWorkArea;
|
||||
bWorkArea ? mii.fState = MFS_CHECKED : mii.fState = MFS_UNCHECKED;
|
||||
SetMenuItemInfoW(hPopup, ID_POPUPMENU_AREA, FALSE, &mii);
|
||||
diag_log("Changed 'Use workarea' option to ", bWorkArea);
|
||||
}
|
||||
if (ID_POPUPMENU_ABOUT == idMenu && !bKPressed)
|
||||
{
|
||||
diag_log("Pressed 'About' menuitem");
|
||||
bKPressed = TRUE;
|
||||
DialogBoxW(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, (DLGPROC)About);
|
||||
bKPressed = FALSE;
|
||||
}
|
||||
if (ID_POPUPMENU_EXIT == idMenu)
|
||||
{
|
||||
diag_log("Pressed 'Exit' menuitem");
|
||||
PostMessageW(hWnd, WM_CLOSE, NULL, NULL);
|
||||
}
|
||||
diag_log("Quiting menu handler");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_QUERYENDSESSION:
|
||||
{
|
||||
diag_log("Recieved WM_QUERYENDSESSION message, lParam = ", lParam);
|
||||
CloseLogFile();
|
||||
return TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_DESTROY:
|
||||
{
|
||||
diag_log("Recived WM_DESTROY message");
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return DefWindowProcW(hWnd, message, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MouseHookProc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (WM_MBUTTONUP == wParam) bMPressed = FALSE;
|
||||
if (WM_MBUTTONDOWN == wParam && bLCTRL && bLWIN && !bMPressed)
|
||||
{
|
||||
diag_log("Pressed LCTRL + LWIN + MMB");
|
||||
bMPressed = TRUE;
|
||||
hFgWnd = GetForegroundWindow();
|
||||
if (IsWindowApprooved(hFgWnd)) MoveWindowToMonitorCenter(hFgWnd, bWorkArea, FALSE);
|
||||
else hFgWnd = NULL;
|
||||
}
|
||||
return CallNextHookEx(NULL, nCode, wParam, lParam);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
pkhs = (KBDLLHOOKSTRUCT*)lParam;
|
||||
|
||||
if (WM_KEYUP == wParam)
|
||||
{
|
||||
if (VK_LCONTROL == pkhs->vkCode) bLCTRL = FALSE;
|
||||
if (VK_LWIN == pkhs->vkCode) bLWIN = FALSE;
|
||||
bKPressed = FALSE;
|
||||
}
|
||||
|
||||
if (WM_KEYDOWN == wParam)
|
||||
{
|
||||
if (VK_LCONTROL == pkhs->vkCode) bLCTRL = TRUE;
|
||||
if (VK_LWIN == pkhs->vkCode) bLWIN = TRUE;
|
||||
|
||||
if (KEY_I == pkhs->vkCode && bLCTRL && bLWIN && !bKPressed) // 'I' key
|
||||
{
|
||||
diag_log("Pressed LCTRL + LWIN + I");
|
||||
bKPressed = TRUE;
|
||||
bShowIcon = !bShowIcon;
|
||||
HandlingTrayIcon();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (KEY_C == pkhs->vkCode && bLCTRL && bLWIN && !bKPressed && !bKEYV) // 'C' key
|
||||
{
|
||||
diag_log("Pressed LCTRL + LWIN + C");
|
||||
bKPressed = TRUE;
|
||||
hFgWnd = GetForegroundWindow();
|
||||
if (IsWindowApprooved(hFgWnd)) MoveWindowToMonitorCenter(hFgWnd, bWorkArea, FALSE);
|
||||
else hFgWnd = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (KEY_V == pkhs->vkCode && bLCTRL && bLWIN && !bKPressed && !bKEYV) // 'V' key
|
||||
{
|
||||
diag_log("Pressed LCTRL + LWIN + V");
|
||||
bKPressed = TRUE; bKEYV = TRUE;
|
||||
hFgWnd = GetForegroundWindow();
|
||||
if (IsWindowApprooved(hFgWnd))
|
||||
{
|
||||
diag_log("Opening 'Manual editing' dialog");
|
||||
DialogBoxW(hInst, MAKEINTRESOURCE(IDD_MANUAL_EDITING), hFgWnd, (DLGPROC)DlgProc);
|
||||
SetForegroundWindow(hFgWnd);
|
||||
}
|
||||
else hFgWnd = NULL;
|
||||
bKEYV = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return CallNextHookEx(NULL, nCode, wParam, lParam);
|
||||
}
|
||||
|
||||
BOOL CALLBACK DlgProc(HWND hDlg, UINT dlgmsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int x, y, w, h;
|
||||
switch (dlgmsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
diag_log("Initializing 'Manual editing' dialog");
|
||||
SetWindowTextW(hDlg, szTitle);
|
||||
GetWindowTextW(hFgWnd, szWinTitle, _countof(szWinTitle));
|
||||
GetClassNameW(hFgWnd, szWinClass, _countof(szWinClass));
|
||||
GetWindowRect(hFgWnd, &rcFW);
|
||||
x = rcFW.left;
|
||||
y = rcFW.top;
|
||||
w = rcFW.right - rcFW.left;
|
||||
h = rcFW.bottom - rcFW.top;
|
||||
SetDlgItemInt(hDlg, IDC_EDIT_X, x, TRUE);
|
||||
SetDlgItemInt(hDlg, IDC_EDIT_Y, y, TRUE);
|
||||
SetDlgItemInt(hDlg, IDC_EDIT_WIDTH, w, FALSE);
|
||||
SetDlgItemInt(hDlg, IDC_EDIT_HEIGHT, h, FALSE);
|
||||
SetDlgItemTextW(hDlg, IDC_EDIT_TITLE, szWinTitle);
|
||||
SetDlgItemTextW(hDlg, IDC_EDIT_CLASS, szWinClass);
|
||||
UpdateWindow(hDlg);
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_BUTTON_SET:
|
||||
{
|
||||
diag_log("Pressed 'Set' button");
|
||||
x = GetDlgItemInt(hDlg, IDC_EDIT_X, NULL, TRUE);
|
||||
y = GetDlgItemInt(hDlg, IDC_EDIT_Y, NULL, TRUE);
|
||||
w = GetDlgItemInt(hDlg, IDC_EDIT_WIDTH, NULL, FALSE);
|
||||
h = GetDlgItemInt(hDlg, IDC_EDIT_HEIGHT, NULL, FALSE);
|
||||
SendMessageW(hFgWnd, WM_ENTERSIZEMOVE, NULL, NULL);
|
||||
MoveWindow(hFgWnd, x, y, w, h, TRUE);
|
||||
SendMessageW(hFgWnd, WM_EXITSIZEMOVE, NULL, NULL);
|
||||
diag_log("Window with handle 0x", hFgWnd, " was moved to x = ", x, ", y = ", y);
|
||||
return TRUE;
|
||||
break;
|
||||
}
|
||||
case IDCANCEL:
|
||||
case IDC_BUTTON_CLOSE:
|
||||
{
|
||||
diag_log("Closing 'Manual editing' dialog");
|
||||
EndDialog(hDlg, LOWORD(wParam));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool IsWindowApprooved(HWND hFW)
|
||||
{
|
||||
diag_log("Entering IsWindowApprooved(), handle = 0x", hFW);
|
||||
bool bApprooved = FALSE;
|
||||
if (hFW)
|
||||
{
|
||||
GetClassNameW(hFW, szWinClass, _countof(szWinClass));
|
||||
if (GetWindowTextW(hFW, (LPWSTR)szBuffer, BUF_LEN - sizeof(WCHAR))) diag_log("Title: '", ConvertWideToUtf8((LPWSTR)szBuffer), "'");
|
||||
if (IsIconic(hFW)) diag_log("Window is iconic");
|
||||
if (IsZoomed(hFW)) diag_log("Window is maximized");
|
||||
if ((wcscmp(szWinClass, szWinCore) != 0) &&
|
||||
(wcscmp(szWinClass, szWorkerW) != 0) &&
|
||||
(hFW != hDesktop && hFW != hTaskBar && hFW != hProgman))
|
||||
{
|
||||
if (!IsIconic(hFW) && !IsZoomed(hFW))
|
||||
{
|
||||
diag_log("Window is approved");
|
||||
bApprooved = TRUE;
|
||||
}
|
||||
else ShowError(IDS_ERR_MAXMIN);
|
||||
}
|
||||
else diag_log("The window belongs to the Windows environment");
|
||||
}
|
||||
if (!bApprooved) diag_log("Window is not approved!");
|
||||
diag_log("Quiting IsWindowApprooved()");
|
||||
return bApprooved;
|
||||
}
|
||||
|
||||
VOID HandlingTrayIcon()
|
||||
{
|
||||
diag_log("Entering HandlingTrayIcon(), bShowIcon = ", bShowIcon);
|
||||
if (bShowIcon)
|
||||
{
|
||||
bool bResult1 = Shell_NotifyIconW(NIM_ADD, &nid);
|
||||
diag_log("Shell_NotifyIconW(NIM_ADD): ", bResult1);
|
||||
bool bResult2 = Shell_NotifyIconW(NIM_SETVERSION, &nid);
|
||||
diag_log("Shell_NotifyIconW(NIM_SETVERSION): ", bResult2);
|
||||
if (!bResult1 || !bResult2)
|
||||
{
|
||||
diag_log("Error creating trayicon!");
|
||||
ShowError(IDS_ERR_ICON);
|
||||
bShowIcon = FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Shell_NotifyIconW(NIM_DELETE, &nid);
|
||||
}
|
||||
diag_log("Quiting HandlingTrayIcon()");
|
||||
}
|
||||
|
||||
VOID ShowError(UINT uID)
|
||||
{
|
||||
WCHAR szErrorText[MAX_LOADSTRING]; // Error's text
|
||||
LoadStringW(hInst, uID, szErrorText, _countof(szErrorText));
|
||||
MessageBoxW(NULL, szErrorText, szTitle, MB_OK | MB_ICONERROR | MB_TOPMOST);
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
INITCOMMONCONTROLSEX icex = { 0 };
|
||||
icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
|
||||
icex.dwICC = ICC_LINK_CLASS;
|
||||
InitCommonControlsEx(&icex);
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
diag_log("Initializing 'About' dialog");
|
||||
SetDlgItemTextW(hDlg, IDC_ABOUTHELP, szAbout);
|
||||
return (INT_PTR)TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
LPNMHDR pNMHdr = (LPNMHDR)lParam;
|
||||
if ((NM_CLICK == pNMHdr->code || NM_RETURN == pNMHdr->code) && IDC_DONATIONLINK == pNMHdr->idFrom)
|
||||
{
|
||||
PNMLINK pNMLink = (PNMLINK)pNMHdr;
|
||||
LITEM item = pNMLink->item;
|
||||
ShellExecuteW(NULL, L"open", item.szUrl, NULL, NULL, SW_SHOW);
|
||||
diag_log("Pressed donation link");
|
||||
return (INT_PTR)TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_COMMAND:
|
||||
{
|
||||
if (IDOK == LOWORD(wParam) || IDCANCEL == LOWORD(wParam))
|
||||
{
|
||||
EndDialog(hDlg, LOWORD(wParam));
|
||||
diag_log("Closing 'About' dialog");
|
||||
return (INT_PTR)TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (INT_PTR)FALSE;
|
||||
}
|
||||
|
||||
std::string ConvertWideToUtf8(const std::wstring& wstr)
|
||||
{
|
||||
int count = WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), wstr.length(), NULL, 0, NULL, NULL);
|
||||
std::string str(count, 0);
|
||||
WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), -1, &str[0], count, NULL, NULL);
|
||||
return str;
|
||||
}
|
||||
|
||||
48
wCenterWindow/wCenterWindow.exe.manifest
Normal file
48
wCenterWindow/wCenterWindow.exe.manifest
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
|
||||
<description>Centers windows by hotkey (C++)</description>
|
||||
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="Win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
processorArchitecture="*"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!--ID Windows Vista -->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<!--ID Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<!--ID Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<!--ID Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!--ID Windows 10/11 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
</application>
|
||||
</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">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
</assembly>
|
||||
@@ -1,3 +1,4 @@
|
||||
// wCenterWindow
|
||||
// wCenterWindow.h
|
||||
#pragma once
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 36 KiB |
Binary file not shown.
@@ -1,172 +1,206 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{6A775901-6C34-4E96-B359-C11C76A520BB}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>wCenterWindow</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="wCenterWindow.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="wCenterWindow.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="wCenterWindow.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="small.ico" />
|
||||
<Image Include="wCenterWindow.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{f1a1603a-f5d0-47b8-8e4b-cf17747bcfba}</ProjectGuid>
|
||||
<RootNamespace>wCenterWindow</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<XPDeprecationWarning>false</XPDeprecationWarning>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<CopyCppRuntimeToOutputDir>false</CopyCppRuntimeToOutputDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>false</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
<ManifestFromManagedAssembly>
|
||||
</ManifestFromManagedAssembly>
|
||||
</Manifest>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)Update_version.bat"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)Update_version.bat"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)Update_version.bat"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)Update_version.bat"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="Logger.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="wCenterWindow.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Logger.cpp" />
|
||||
<ClCompile Include="wCenterWindow.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="wCenterWindow.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="small.ico" />
|
||||
<Image Include="wCenterWindow.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="wCenterWindow.exe.manifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\README.md" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,49 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Исходные файлы">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы заголовков">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы ресурсов">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="wCenterWindow.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="wCenterWindow.cpp">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="wCenterWindow.rc">
|
||||
<Filter>Файлы ресурсов</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="small.ico">
|
||||
<Filter>Файлы ресурсов</Filter>
|
||||
</Image>
|
||||
<Image Include="wCenterWindow.ico">
|
||||
<Filter>Файлы ресурсов</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="wCenterWindow.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Logger.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="wCenterWindow.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Logger.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="wCenterWindow.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="small.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
<Image Include="wCenterWindow.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="wCenterWindow.exe.manifest">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Manifest>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\README.md" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
7
wCenterWindow/wCenterWindow.vcxproj.user
Normal file
7
wCenterWindow/wCenterWindow.vcxproj.user
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerCommandArguments>/test1 /test2</LocalDebuggerCommandArguments>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user