mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:43:01 +00:00
[RAPPS] Hide the main window during active download/install if the user closes it (#7014)
This commit is contained in:
parent
2f83e6a65d
commit
053939e27c
7 changed files with 55 additions and 2 deletions
|
@ -39,6 +39,31 @@ CopyTextToClipboard(LPCWSTR lpszText)
|
|||
CloseClipboard();
|
||||
}
|
||||
|
||||
static INT_PTR CALLBACK
|
||||
NothingDlgProc(HWND hDlg, UINT uMsg, WPARAM, LPARAM)
|
||||
{
|
||||
return uMsg == WM_CLOSE ? DestroyWindow(hDlg) : FALSE;
|
||||
}
|
||||
|
||||
VOID
|
||||
EmulateDialogReposition(HWND hwnd)
|
||||
{
|
||||
static const DWORD DlgTmpl[] = { WS_POPUP | WS_CAPTION | WS_SYSMENU, 0, 0, 0, 0, 0 };
|
||||
HWND hDlg = CreateDialogIndirectW(NULL, (LPDLGTEMPLATE)DlgTmpl, NULL, NothingDlgProc);
|
||||
if (hDlg)
|
||||
{
|
||||
RECT r;
|
||||
GetWindowRect(hwnd, &r);
|
||||
if (SetWindowPos(hDlg, hDlg, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_NOZORDER | SWP_NOACTIVATE))
|
||||
{
|
||||
SendMessage(hDlg, DM_REPOSITION, 0, 0);
|
||||
if (GetWindowRect(hDlg, &r))
|
||||
SetWindowPos(hwnd, hwnd, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
}
|
||||
SendMessage(hDlg, WM_CLOSE, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
ShowPopupMenuEx(HWND hwnd, HWND hwndOwner, UINT MenuID, UINT DefaultItem, POINT *Point)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue