Ignore:
Timestamp:
2001-06-13T11:02:50+12:00 (23 years ago)
Author:
cs025
Message:

Added better monitoring of installation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsinstaller/copyProgress.h

    r1397 r2534  
    22#define _COPYPROGRESS_H_
    33#include <windows.h>
     4#include <time.h>
    45
    56class copyProgressBar
     
    78        unsigned long total;
    89        unsigned long copied;
    9     HWND                    progressParent;
    10     HWND                    progressBar;
     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;
    1118    public:
    12     copyProgressBar();
    13     copyProgressBar(unsigned long totalSize);
    14     void registerClass();
     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
    1527    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
    1632    void done(unsigned long bytesDone);
    17     void init(unsigned long totalSize);
     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
    1839    void show();
     40    // close (hide) the progress bar
    1941    void close();
    2042};
Note: See TracChangeset for help on using the changeset viewer.