X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d13b34d3f2be575d59747a5926000be7b28a45dc..d9106ec5b679d5c9a5eb61b9633e5f3b1437b6a8:/src/msw/dialog.cpp diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index b04985d6c2..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); @@ -443,7 +440,7 @@ WXLRESULT wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPar { // set our cursor for all windows (but see below) wxCursor cursor = m_cursor; - if ( !cursor.Ok() ) + if ( !cursor.IsOk() ) cursor = wxCURSOR_ARROW; ::SetCursor(GetHcursorOf(cursor)); @@ -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; }