use the native msg box if available, fall back to wxWin one instead of doing the opposite
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
99397a94d0
commit
6b6267d320
@ -750,20 +750,9 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
|
||||
// developpers only
|
||||
wxStrcat(szBuf, wxT("\nDo you want to stop the program?\nYou can also choose [Cancel] to suppress further warnings."));
|
||||
|
||||
#if wxUSE_GUI
|
||||
switch ( wxMessageBox(szBuf, wxT("Debug"),
|
||||
wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
|
||||
case wxYES:
|
||||
Trap();
|
||||
break;
|
||||
|
||||
case wxCANCEL:
|
||||
s_bNoAsserts = TRUE;
|
||||
break;
|
||||
|
||||
//case wxNO: nothing to do
|
||||
}
|
||||
#else // !GUI, but MSW
|
||||
// use the native message box if available: this is more robust than
|
||||
// using our own
|
||||
#ifdef __WXMSW__
|
||||
switch ( ::MessageBox(NULL, szBuf, _T("Debug"),
|
||||
MB_YESNOCANCEL | MB_ICONSTOP ) ) {
|
||||
case IDYES:
|
||||
@ -776,6 +765,19 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
|
||||
|
||||
//case IDNO: nothing to do
|
||||
}
|
||||
#else // !MSW
|
||||
switch ( wxMessageBox(szBuf, wxT("Debug"),
|
||||
wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
|
||||
case wxYES:
|
||||
Trap();
|
||||
break;
|
||||
|
||||
case wxCANCEL:
|
||||
s_bNoAsserts = TRUE;
|
||||
break;
|
||||
|
||||
//case wxNO: nothing to do
|
||||
}
|
||||
#endif // GUI or MSW
|
||||
|
||||
#else // !GUI
|
||||
|
Loading…
Reference in New Issue
Block a user