Disable main window when showing msgbox in wxSafeShowMessage()
Pass correct parent HWND to ::MessageBox() in order to disable the window while the message box is shown, as this function is supposed to be similar to modal wxMessageBox() and it was unexpected that the application could be reentered via the event handlers from inside it. This required adding wxAppTraits::GetMainHWND() in order to only use the HWND in GUI applications from the function defined in non-GUI code.
This commit is contained in:
@@ -58,6 +58,9 @@ public:
|
||||
// write text to the console, return true if ok or false on error
|
||||
virtual bool WriteToStderr(const wxString& text) = 0;
|
||||
|
||||
// return the main application window or 0 if none
|
||||
virtual WXHWND GetMainHWND() const = 0;
|
||||
|
||||
protected:
|
||||
#if wxUSE_THREADS
|
||||
// implementation of WaitForThread() for the console applications which is
|
||||
|
Reference in New Issue
Block a user