- m_hasAbortButton = (style & wxPD_CAN_ABORT) != 0;
- m_hasSkipButton = (style & wxPD_CAN_SKIP) != 0;
+ // We need a running event loop in order to update the dialog and be able
+ // to process clicks on its buttons, so ensure that there is one running
+ // even if this means we have to start it ourselves (this happens most
+ // commonly during the program initialization, e.g. for the progress
+ // dialogs shown from overridden wxApp::OnInit()).
+ if ( !wxEventLoopBase::GetActive() )
+ {
+ m_tempEventLoop = new wxEventLoop;
+ wxEventLoop::SetActive(m_tempEventLoop);
+ }