Last change
on this file since 3177 was 2534, checked in by cs025, 23 years ago |
Added better monitoring of installation
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.3 KB
|
Rev | Line | |
---|
[1397] | 1 | #ifndef _COPYPROGRESS_H_
|
---|
| 2 | #define _COPYPROGRESS_H_
|
---|
[2534] | 3 | #include <windows.h>
|
---|
| 4 | #include <time.h>
|
---|
| 5 |
|
---|
| 6 | class copyProgressBar
|
---|
| 7 | { private:
|
---|
| 8 | unsigned long total;
|
---|
| 9 | unsigned long copied;
|
---|
| 10 | unsigned long totalFiles;
|
---|
| 11 | unsigned long copiedFiles;
|
---|
| 12 | HWND progressParent;
|
---|
| 13 | HWND progressBar;
|
---|
| 14 | HWND progressText;
|
---|
| 15 | HWND progressTime;
|
---|
| 16 | bool showing;
|
---|
| 17 | time_t startTime;
|
---|
| 18 | public:
|
---|
| 19 | // constructors/destructors
|
---|
| 20 | copyProgressBar();
|
---|
| 21 |
|
---|
| 22 | copyProgressBar(unsigned long totalSize, unsigned long totalFiles);
|
---|
| 23 | ~copyProgressBar(); // destructor introduced to ensure that open windows are closed
|
---|
| 24 |
|
---|
| 25 | void registerClass(); // does the registration of the window classes into Windows
|
---|
| 26 | // the window procedure itself
|
---|
| 27 | LRESULT CALLBACK windowProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam);
|
---|
| 28 |
|
---|
| 29 | // timing methods
|
---|
| 30 | void setStartTime() { this->startTime = time(NULL); }
|
---|
| 31 | // messaging methods
|
---|
| 32 | void done(unsigned long bytesDone);
|
---|
| 33 | void done(unsigned long bytesDone, LPSTR message);
|
---|
| 34 | void message(LPSTR message);
|
---|
| 35 |
|
---|
| 36 | // reinitialise the progress bar, giving a new total completion size
|
---|
| 37 | void init(unsigned long totalSize, unsigned long totalFiles);
|
---|
| 38 | // show the progress bar
|
---|
[1397] | 39 | void show();
|
---|
[2534] | 40 | // close (hide) the progress bar
|
---|
[1397] | 41 | void close();
|
---|
| 42 | };
|
---|
| 43 | #endif |
---|
Note:
See
TracBrowser
for help on using the repository browser.