标签:gre frame ini widget update return dal upd ring
#include <wx/wx.h> #include <wx/progdlg.h> class myApp : public wxApp { public: bool OnInit(void); int OnExit(void); }; IMPLEMENT_APP(myApp) bool myApp :: OnInit(){ int max = 500; 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 ); for(int i = 0; i < max; i++){ wxMilliSleep(10); //here are computations dialog->Update(i,wxString::Format(wxT("%i"),i),NULL); } // dialog->Update(max); delete dialog; return true; } int myApp :: OnExit(){ return 0; }
标签:gre frame ini widget update return dal upd ring
原文地址:http://www.cnblogs.com/tiandsp/p/7440788.html