added test for wxProgressDialog::Resume

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-06-04 18:14:26 +00:00
parent 6b0d8a01d1
commit d8ddee9c46

View File

@ -657,7 +657,7 @@ void MyFrame::ShowProgress( wxCommandEvent& WXUNUSED(event) )
wxPD_REMAINING_TIME); wxPD_REMAINING_TIME);
bool cont = TRUE; bool cont = TRUE;
for ( int i = 0; i <= max && cont; i++ ) for ( int i = 0; i <= max; i++ )
{ {
wxSleep(1); wxSleep(1);
if ( i == max ) if ( i == max )
@ -672,6 +672,17 @@ void MyFrame::ShowProgress( wxCommandEvent& WXUNUSED(event) )
{ {
cont = dialog.Update(i); cont = dialog.Update(i);
} }
if ( !cont )
{
if ( wxMessageBox("Do you really want to cancel?\n"
"Second line.", // message
"Dialogs question", // caption
wxYES_NO | wxCENTRE) == wxYES )
break;
dialog.Resume();
}
} }
if ( !cont ) if ( !cont )