wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
cancelEvent.SetEventObject( this );
- GetEventHandler()->ProcessEvent(cancelEvent);
+ HandleWindowEvent(cancelEvent);
s_closing.DeleteObject(this);
}
wxWindow *parent = wxTheApp->GetTopWindow();
if ( parent &&
parent != this &&
- parent->IsBeingDeleted() &&
+ !parent->IsBeingDeleted() &&
!(parent->GetExtraStyle() & wxWS_EX_TRANSIENT) )
{
m_parent = parent;