diff options
Diffstat (limited to 'CPP/Windows/Control/ProgressBar.h')
-rw-r--r-- | CPP/Windows/Control/ProgressBar.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/CPP/Windows/Control/ProgressBar.h b/CPP/Windows/Control/ProgressBar.h new file mode 100644 index 0000000..0374306 --- /dev/null +++ b/CPP/Windows/Control/ProgressBar.h | |||
@@ -0,0 +1,35 @@ | |||
1 | // Windows/Control/ProgressBar.h | ||
2 | |||
3 | #ifndef __WINDOWS_CONTROL_PROGRESSBAR_H | ||
4 | #define __WINDOWS_CONTROL_PROGRESSBAR_H | ||
5 | |||
6 | #include "../../Common/MyWindows.h" | ||
7 | |||
8 | #include <CommCtrl.h> | ||
9 | |||
10 | #include "../Window.h" | ||
11 | |||
12 | namespace NWindows { | ||
13 | namespace NControl { | ||
14 | |||
15 | class CProgressBar: public CWindow | ||
16 | { | ||
17 | public: | ||
18 | LRESULT SetPos(int pos) { return SendMsg(PBM_SETPOS, pos, 0); } | ||
19 | LRESULT DeltaPos(int increment) { return SendMsg(PBM_DELTAPOS, increment, 0); } | ||
20 | UINT GetPos() { return (UINT)SendMsg(PBM_GETPOS, 0, 0); } | ||
21 | LRESULT SetRange(unsigned short minValue, unsigned short maxValue) { return SendMsg(PBM_SETRANGE, 0, MAKELPARAM(minValue, maxValue)); } | ||
22 | DWORD SetRange32(int minValue, int maxValue) { return (DWORD)SendMsg(PBM_SETRANGE32, minValue, maxValue); } | ||
23 | int SetStep(int step) { return (int)SendMsg(PBM_SETSTEP, step, 0); } | ||
24 | LRESULT StepIt() { return SendMsg(PBM_STEPIT, 0, 0); } | ||
25 | INT GetRange(bool minValue, PPBRANGE range) { return (INT)SendMsg(PBM_GETRANGE, BoolToBOOL(minValue), (LPARAM)range); } | ||
26 | |||
27 | #ifndef UNDER_CE | ||
28 | COLORREF SetBarColor(COLORREF color) { return (COLORREF)SendMsg(PBM_SETBARCOLOR, 0, color); } | ||
29 | COLORREF SetBackgroundColor(COLORREF color) { return (COLORREF)SendMsg(PBM_SETBKCOLOR, 0, color); } | ||
30 | #endif | ||
31 | }; | ||
32 | |||
33 | }} | ||
34 | |||
35 | #endif | ||