Added the 'Center' button and the ability to center the window from the 'Manual editing' dialog.
This commit is contained in:
@@ -1,25 +1,3 @@
|
|||||||
// MIT License
|
|
||||||
//
|
|
||||||
// Copyright (c) 2023 W0LF aka 'dreamforce'
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
|
||||||
// in the Software without restriction, including without limitation the rights
|
|
||||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
// copies of the Software, and to permit persons to whom the Software is
|
|
||||||
// furnished to do so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
//{{NO_DEPENDENCIES}}
|
//{{NO_DEPENDENCIES}}
|
||||||
// Microsoft Visual C++ generated include file.
|
// Microsoft Visual C++ generated include file.
|
||||||
// Used by wCenterWindow.rc
|
// Used by wCenterWindow.rc
|
||||||
@@ -57,14 +35,15 @@
|
|||||||
#define IDC_EDIT_TITLE 1004
|
#define IDC_EDIT_TITLE 1004
|
||||||
#define IDC_EDIT_CLASS 1005
|
#define IDC_EDIT_CLASS 1005
|
||||||
#define IDC_BUTTON_SET 1006
|
#define IDC_BUTTON_SET 1006
|
||||||
#define IDC_BUTTON_CLOSE 1007
|
#define IDC_BUTTON_CENTER 1007
|
||||||
#define IDC_ABOUTHELP 1008
|
#define IDC_BUTTON_CLOSE 1008
|
||||||
#define IDC_DONATIONLINK 1009
|
#define IDC_ABOUTHELP 1009
|
||||||
#define IDC_DONATIONTEXT 1010
|
#define IDC_DONATIONLINK 1010
|
||||||
#define IDC_ABOUT_PROGNAME 1011
|
#define IDC_DONATIONTEXT 1011
|
||||||
#define IDC_ABOUT_COPYRIGHT 1012
|
#define IDC_ABOUT_PROGNAME 1012
|
||||||
#define IDC_ABOUT_BUILDTIME 1013
|
#define IDC_ABOUT_COPYRIGHT 1013
|
||||||
#define IDC_ABOUTEDIT 1014
|
#define IDC_ABOUT_BUILDTIME 1014
|
||||||
|
#define IDC_ABOUTEDIT 1015
|
||||||
#define IDC_STATIC -1
|
#define IDC_STATIC -1
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
@@ -74,7 +53,7 @@
|
|||||||
#define _APS_NO_MFC 1
|
#define _APS_NO_MFC 1
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 130
|
#define _APS_NEXT_RESOURCE_VALUE 130
|
||||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1015
|
#define _APS_NEXT_CONTROL_VALUE 1016
|
||||||
#define _APS_NEXT_SYMED_VALUE 126
|
#define _APS_NEXT_SYMED_VALUE 126
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -23,8 +23,6 @@
|
|||||||
// wCenterWindow
|
// wCenterWindow
|
||||||
// wCenterWindow.cpp
|
// wCenterWindow.cpp
|
||||||
|
|
||||||
// TODO: Add license info into About dialog.
|
|
||||||
// TODO: Add 'Center' button into Manual Editing dialog.
|
|
||||||
// TODO: Fix tray icon that disappears after explorer reboot.
|
// TODO: Fix tray icon that disappears after explorer reboot.
|
||||||
// TODO: Split main cpp-file to separate files.
|
// TODO: Split main cpp-file to separate files.
|
||||||
// TODO: Change keyboard low-level hook to RegisterHotKey function.
|
// TODO: Change keyboard low-level hook to RegisterHotKey function.
|
||||||
@@ -528,6 +526,16 @@ INT_PTR CALLBACK DlgProc(HWND hDlg, UINT dlgmsg, WPARAM wParam, LPARAM lParam)
|
|||||||
return static_cast<INT_PTR>(TRUE);
|
return static_cast<INT_PTR>(TRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case IDC_BUTTON_CENTER:
|
||||||
|
{
|
||||||
|
logger.Out(L"%s(%d): Pressed the 'Center' button", TEXT(__FUNCTION__), __LINE__);
|
||||||
|
|
||||||
|
bKPressed = TRUE;
|
||||||
|
if (IsWindowApprooved(hFgWnd)) MoveWindowToMonitorCenter(hFgWnd, bWorkArea, FALSE);
|
||||||
|
else hFgWnd = NULL;
|
||||||
|
return static_cast<INT_PTR>(TRUE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case IDCANCEL:
|
case IDCANCEL:
|
||||||
case IDC_BUTTON_CLOSE:
|
case IDC_BUTTON_CLOSE:
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user