mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-20 21:13:25 +08:00
Merge remote-tracking branch 'Notepad3_upstream_Rizone/master' into Dev_NewFeatures
This commit is contained in:
commit
b6d2587550
@ -3108,7 +3108,10 @@ void CenterDlgInParent(HWND hDlg)
|
||||
|
||||
HWND const hParent = GetParent(hDlg);
|
||||
RECT rcParent;
|
||||
GetWindowRect(hParent, &rcParent);
|
||||
if (hParent)
|
||||
GetWindowRect(hParent, &rcParent);
|
||||
else
|
||||
GetWindowRect(GetDesktopWindow(), &rcParent);
|
||||
|
||||
HMONITOR const hMonitor = MonitorFromRect(&rcParent, MONITOR_DEFAULTTONEAREST);
|
||||
|
||||
@ -3136,7 +3139,7 @@ void CenterDlgInParent(HWND hDlg)
|
||||
|
||||
SetWindowPos(hDlg, NULL, clampi(x, xMin, xMax), clampi(y, yMin, yMax), 0, 0, SWP_NOZORDER | SWP_NOSIZE);
|
||||
|
||||
//SnapToDefaultButton(hDlg);
|
||||
//~SnapToDefaultButton(hDlg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -546,12 +546,6 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
|
||||
// set AppUserModelID
|
||||
PrivateSetCurrentProcessExplicitAppUserModelID(Settings2.AppUserModelID);
|
||||
|
||||
// Command Line Help Dialog
|
||||
if (s_flagDisplayHelp) {
|
||||
DisplayCmdLineHelp(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Adapt window class name
|
||||
if (s_flagIsElevated) {
|
||||
StringCchCat(s_wchWndClass, COUNTOF(s_wchWndClass), L"U");
|
||||
@ -642,6 +636,13 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
|
||||
s_hRichEdit = LoadLibrary(L"MSFTEDIT.DLL"); // Use "RichEdit50W" for control in common_res.h
|
||||
}
|
||||
|
||||
// Command Line Help Dialog
|
||||
if (s_flagDisplayHelp) {
|
||||
DisplayCmdLineHelp(NULL);
|
||||
_CleanUpResources(NULL, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
s_msgTaskbarCreated = RegisterWindowMessage(L"TaskbarCreated");
|
||||
|
||||
if (!Globals.hDlgIcon) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user