Use new wxAppTraits::SafeMessageBox() in wxSafeShowMessage()

This allows to show message boxes in ports other than wxMSW too by doing
it only when it is safe, i.e. when the GUI is initialized, while still
keeping the old code directly using the native MessageBox() function for
MSW for maximal robustness.
This commit is contained in:
Vadim Zeitlin
2021-03-07 20:50:30 +01:00
parent fdd4ff8bf9
commit e00d5e131b
7 changed files with 107 additions and 28 deletions

View File

@@ -61,6 +61,10 @@ public:
// return the main application window or 0 if none
virtual WXHWND GetMainHWND() const = 0;
// implement this base class function for both console and GUI applications
virtual bool SafeMessageBox(const wxString& text,
const wxString& title) wxOVERRIDE;
protected:
#if wxUSE_THREADS
// implementation of WaitForThread() for the console applications which is