2015-03-03 09:32 AM - last edited on 2023-08-01 01:36 PM by Doreena Deng
2015-03-05 10:21 AM
'GDLG' 32500 Modal | noGrow 0 0 312 195 "Dialog with ProgressBar" { //... /* [ 6] */ ProgressBar 13 140 286 15 /*minValue:*/ 0 /*maxValue:*/ 100 ClientEdge //... }
class MyDialog : public DG::ModalDialog { private: // friend classes friend class MyObserver; private: //... DG::ProgressBar m_progressBar; //... public: MyDialog (GSResModule dialResModule, short resId, GSResModule dialIconResModule); ~MyDialog (); };
MyDialog::MyDialog (GSResModule dialResModule, short resId, GSResModule dialIconResModule): DG::ModalDialog (dialResModule, resId, dialIconResModule), m_progressBar (GetReference (), 6), //... { }
m_progressBar.SetValue (<new value between minValue and maxValue>);
// Init processwindow: short nPhase = 1; Int32 maxValue = 100; ACAPI_Interface (APIIo_InitProcessWindowID, "<progressTitle>", &nPhase); // you can define more phases also // Start progressbar: ACAPI_Interface (APIIo_SetNextProcessPhaseID, "<progressSubtitle>", &maxValue); // Update progressbar with new value: Int32 progress = 0; ACAPI_Interface (APIIo_SetProcessValueID, &progress, NULL); progress++; ACAPI_Interface (APIIo_SetProcessValueID, &progress, NULL); // Processwindow contains a Cancel button also: if (ACAPI_Interface (APIIo_IsProcessCanceledID, NULL, NULL)) { // user cancelled the process! }
2015-03-19 02:15 PM