From f7ddb43b885622d4a387e364077af8ee1544fbec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 22 Jul 2022 03:08:34 +0200 Subject: Set owner of termination message box. If the main window exists, it is probably a good idea for the message box to be owned by it. Otherwise, the user may continue to interact with the main window. Of course, that could sometimes be a benefit, but it SEEMS a bit unsafe... I might change this in the future. --- c/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'c/main.cpp') diff --git a/c/main.cpp b/c/main.cpp index 4f31e7b..5a33405 100644 --- a/c/main.cpp +++ b/c/main.cpp @@ -57,7 +57,7 @@ void TerminateMsg(const T* sz1, const T* sz2) noexcept ss << ": " << sz2; else ss << "."; - AWFUN(T, MessageBox)((HWND)NULL, ss.str().c_str(), AWTEXT(T, "Fatal Error"), MB_ICONERROR); + AWFUN(T, MessageBox)(g_hWnd, ss.str().c_str(), AWTEXT(T, "Fatal Error"), MB_ICONERROR); } void OnTerminate() noexcept -- cgit v1.2.3