#endif
#include "wx/dialog.h"
+#include "wx/testing.h"
#ifndef WX_PRECOMP
#include "wx/msw/wrapcdlg.h"
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();
if ( EmulateButtonClickIfPresent(idOk) )
return true;
- wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetAffirmativeId());
+ wxCommandEvent event(wxEVT_BUTTON, GetAffirmativeId());
event.SetEventObject(this);
return HandleWindowEvent(event);
}
#endif // wxUSE_DIALOG_SIZEGRIP
- // the Windows dialogs unfortunately are not meant to be resizeable
+ // the Windows dialogs unfortunately are not meant to be resizable
// at all and their standard class doesn't include CS_[VH]REDRAW
// styles which means that the window is not refreshed properly
// after the resize and no amount of WS_CLIPCHILDREN/SIBLINGS can
{
// 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));
}
if ( !processed )
- rc = wxWindow::MSWWindowProc(message, wParam, lParam);
+ rc = wxDialogBase::MSWWindowProc(message, wParam, lParam);
return rc;
}