]>
Commit | Line | Data |
---|---|---|
b7301c43 RC |
1 | #ifndef CINSTALL_THREEBAR_H |
2 | #define CINSTALL_THREEBAR_H | |
3 | ||
4 | /* | |
5 | * Copyright (c) 2001, Gary R. Van Sickle. | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License as published by | |
9 | * the Free Software Foundation; either version 2 of the License, or | |
10 | * (at your option) any later version. | |
11 | * | |
12 | * A copy of the GNU General Public License can be found at | |
13 | * http://www.gnu.org/ | |
14 | * | |
15 | * Written by Gary R. Van Sickle <g.r.vansickle@worldnet.att.net> | |
16 | * | |
17 | */ | |
18 | ||
19 | // This is the header for the ThreeBarProgressPage class. It is a fairly generic | |
20 | // progress indicator property page with three progress bars. | |
21 | ||
22 | ||
23 | #include "win32.h" | |
24 | #include "proppage.h" | |
25 | ||
26 | #define WM_APP_START_DOWNLOAD WM_APP+0 | |
27 | #define WM_APP_DOWNLOAD_THREAD_COMPLETE WM_APP+1 | |
28 | #define WM_APP_START_INSTALL WM_APP+2 | |
29 | #define WM_APP_INSTALL_THREAD_COMPLETE WM_APP+3 | |
30 | #define WM_APP_START_SITE_INFO_DOWNLOAD WM_APP+4 | |
31 | #define WM_APP_SITE_INFO_DOWNLOAD_COMPLETE WM_APP+5 | |
32 | #define WM_APP_START_SETUP_INI_DOWNLOAD WM_APP+6 | |
33 | #define WM_APP_SETUP_INI_DOWNLOAD_COMPLETE WM_APP+7 | |
34 | ||
35 | class ThreeBarProgressPage:public PropertyPage | |
36 | { | |
37 | HWND ins_dialog; | |
38 | HWND ins_action; | |
39 | HWND ins_pkgname; | |
40 | HWND ins_filename; | |
41 | HWND ins_pprogress; | |
42 | HWND ins_iprogress; | |
43 | HWND ins_diskfull; | |
44 | HWND ins_bl_package; | |
45 | HWND ins_bl_total; | |
46 | HWND ins_bl_disk; | |
47 | ||
48 | int task; | |
49 | ||
50 | void EnableSingleBar (bool enable = true); | |
51 | ||
52 | public: | |
53 | ThreeBarProgressPage () | |
54 | { | |
55 | }; | |
56 | virtual ~ ThreeBarProgressPage () | |
57 | { | |
58 | }; | |
59 | ||
60 | bool Create (); | |
61 | ||
62 | virtual void OnInit (); | |
63 | virtual void OnActivate (); | |
64 | virtual bool OnMessageApp (UINT uMsg, WPARAM wParam, LPARAM lParam); | |
65 | ||
66 | void SetText1 (const TCHAR * t); | |
67 | void SetText2 (const TCHAR * t); | |
68 | void SetText3 (const TCHAR * t); | |
69 | ||
70 | void SetBar1 (long progress, long max = 100); | |
71 | void SetBar2 (long progress, long max = 100); | |
72 | void SetBar3 (long progress, long max = 100); | |
73 | ||
74 | void SetActivateTask (int t) | |
75 | { | |
76 | task = t; | |
77 | }; | |
78 | }; | |
79 | ||
80 | ||
81 | #endif // CINSTALL_THREEBAR_H |