1 #ifndef APE_MACPROGRESSHELPER_H
2 #define APE_MACPROGRESSHELPER_H
4 #define KILL_FLAG_CONTINUE 0
5 #define KILL_FLAG_PAUSE -1
6 #define KILL_FLAG_STOP 1
11 //typedef void ( * APE_PROGRESS_CALLBACK) (int);
13 class CMACProgressHelper
17 CMACProgressHelper(int nTotalSteps
, int *pPercentageDone
, APE_PROGRESS_CALLBACK ProgressCallback
, int *pKillFlag
);
18 virtual ~CMACProgressHelper();
20 void UpdateProgress(int nCurrentStep
= -1, BOOL bForceUpdate
= FALSE
);
21 void UpdateProgressComplete() { UpdateProgress(m_nTotalSteps
, TRUE
); }
23 int ProcessKillFlag(BOOL bSleep
= TRUE
);
28 APE_PROGRESS_CALLBACK m_CallbackFunction
;
30 int *m_pPercentageDone
;
34 int m_nLastCallbackFiredPercentageDone
;
39 #endif // #ifndef APE_MACPROGRESSHELPER_H