mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
Merge pull request #819 from RaiKoHoff/Dev_Fixes4Release
Small fixes for command-line-help dialog
This commit is contained in:
commit
4f545fffdc
@ -3137,7 +3137,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);
|
||||
|
||||
@ -3165,7 +3168,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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -555,12 +555,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");
|
||||
@ -651,6 +645,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