Make dialogs modal and topmost
This commit is contained in:
1 parent
342690dfe9
commit
aeae61245d
3 files changed
+20
-4
No files matched your search
+8
-1
@@ -7,7 +7,14 @@ void App::ShowMessage(const std::wstring& text, UINT flags)
|
||||
{
|
||||
bool previous = modal;
|
||||
modal = true;
|
||||
MessageBoxW(hwnd, text.c_str(), L"Change BootLoader", flags);
|
||||
EnableWindow(hwnd, FALSE);
|
||||
InvalidateRect(hwnd, nullptr, FALSE);
|
||||
UpdateWindow(hwnd);
|
||||
SetForegroundWindow(hwnd);
|
||||
MessageBoxW(hwnd, text.c_str(), L"Change BootLoader",
|
||||
flags | MB_SETFOREGROUND | MB_TOPMOST);
|
||||
EnableWindow(hwnd, TRUE);
|
||||
SetForegroundWindow(hwnd);
|
||||
modal = previous;
|
||||
InvalidateRect(hwnd, nullptr, FALSE);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user