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:
parent
6b0d8a01d1
commit
d8ddee9c46
@ -657,7 +657,7 @@ void MyFrame::ShowProgress( wxCommandEvent& WXUNUSED(event) )
|
||||
wxPD_REMAINING_TIME);
|
||||
|
||||
bool cont = TRUE;
|
||||
for ( int i = 0; i <= max && cont; i++ )
|
||||
for ( int i = 0; i <= max; i++ )
|
||||
{
|
||||
wxSleep(1);
|
||||
if ( i == max )
|
||||
@ -672,6 +672,17 @@ void MyFrame::ShowProgress( wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
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 )
|
||||
|
Loading…
Reference in New Issue
Block a user