` | wxPD_CAN_ABORT` here? `progressDialog.Update` will return `false` upon abort, so it should be easy enough to handle that in the code.