X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b806b98241ab649c169aaa1f134df85e80fb8b..43c42c18d36c703a88b1b7b697bac27fe5608eca:/src/msw/dialog.cpp?ds=sidebyside diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 3e54725e3a..ccab43d45e 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -25,6 +25,7 @@ #endif #include "wx/dialog.h" +#include "wx/testing.h" #ifndef WX_PRECOMP #include "wx/msw/wrapcdlg.h" @@ -194,14 +195,11 @@ bool wxDialog::Show(bool show) return true; } -void wxDialog::Raise() -{ - ::SetForegroundWindow(GetHwnd()); -} - // show dialog modally int wxDialog::ShowModal() { + WX_TESTING_SHOW_MODAL_HOOK(); + wxASSERT_MSG( !IsModal(), wxT("ShowModal() can't be called twice") ); Show(); @@ -338,7 +336,7 @@ bool wxDialog::DoOK() if ( EmulateButtonClickIfPresent(idOk) ) return true; - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetAffirmativeId()); + wxCommandEvent event(wxEVT_BUTTON, GetAffirmativeId()); event.SetEventObject(this); return HandleWindowEvent(event); @@ -464,7 +462,7 @@ WXLRESULT wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPar } if ( !processed ) - rc = wxWindow::MSWWindowProc(message, wParam, lParam); + rc = wxDialogBase::MSWWindowProc(message, wParam, lParam); return rc; }