aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-22 03:08:34 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-22 03:08:34 +0200
commitf7ddb43b885622d4a387e364077af8ee1544fbec (patch)
tree5c926afd3056dd604680b3734b7fcb97a03c4bdb
parent3eb3a554e3c88c0677bd9bd3070e2f1736f4b8cf (diff)
downloadEpisodeBrowser-f7ddb43b885622d4a387e364077af8ee1544fbec.tar.gz
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.
-rw-r--r--c/main.cpp2
1 files changed, 1 insertions, 1 deletions
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