X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b806b98241ab649c169aaa1f134df85e80fb8b..b0ad146aba58fae678c885a9bc5e30d79bffb494:/src/msw/dialog.cpp diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 3e54725e3a..d199ae278b 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -25,6 +24,7 @@ #endif #include "wx/dialog.h" +#include "wx/modalhook.h" #ifndef WX_PRECOMP #include "wx/msw/wrapcdlg.h" @@ -194,14 +194,11 @@ bool wxDialog::Show(bool show) return true; } -void wxDialog::Raise() -{ - ::SetForegroundWindow(GetHwnd()); -} - // show dialog modally int wxDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + wxASSERT_MSG( !IsModal(), wxT("ShowModal() can't be called twice") ); Show(); @@ -338,7 +335,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 +461,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; }