+ if ( (value == m_maximum - 1) && !(GetWindowStyleFlag() & wxPD_AUTO_HIDE) )
+ {
+ if ( m_btnAbort )
+ {
+ // tell the user what he should do...
+ m_btnAbort->SetLabel(_("Close"));
+ }
+
+ if ( !newmsg )
+ {
+ // also provide the finishing message if the application didn't
+ m_msg->SetLabel(_("Done."));
+ }
+
+ m_state = Finished;
+ while ( m_state != Canceled ) // set from OnClose()
+ wxYield();
+
+ // so that we return TRUE below
+ m_state = Finished;
+ }
+