#include #include class myApp : public wxApp { public: bool OnInit(void); int OnExit(void); }; IMPLEMENT_APP(myApp) bool myApp :: OnInit(){ int i, max = 433; wxFrame* frame = new wxFrame(NULL, wxID_ANY, wxT("blah blah")); this->SetTopWindow(frame); frame->Show(true); wxProgressDialog* dialog = new wxProgressDialog(wxT("Wait..."), wxT("Keep waiting..."), max, frame, wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_REMAINING_TIME); for(int i = 0; i < max; i++){ wxMilliSleep(5); //here are computations if(i%23) dialog->Update(i); } dialog->Update(max); delete dialog; return true; } int myApp :: OnExit(){ return 0; }