diff options
Diffstat (limited to 'c/win.cpp')
-rw-r--r-- | c/win.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -4,6 +4,7 @@ #include <windows.h> #include <wininet.h> +#include "main.h" #include "util.h" #include "win.h" @@ -86,9 +87,9 @@ static void CenterNextWindow(HWND hWnd) int EBMessageBox(const std::wstring_view text, const std::wstring_view caption, const UINT uType) { - extern HWND g_hWnd; - CenterNextWindow(g_hWnd); - return MessageBox(g_hWnd, text.data(), caption.data(), uType); + extern Window* g_window; + CenterNextWindow(g_window->hWnd); + return MessageBox(g_window->hWnd, text.data(), caption.data(), uType); } void ShowException(const wchar_t* const fmt, const wchar_t* const title, const UINT uType) noexcept |