diff options
author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2021-12-27 00:00:00 +0000 |
---|---|---|
committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2022-03-18 15:35:13 +0500 |
commit | f19f813537c7aea1c20749c914e756b54a9c3cf5 (patch) | |
tree | 816ba62ca7c0fa19f2eb46d9e9d6f7dd7c3a744d /CPP/Windows/Control/ProgressBar.h | |
parent | 98e06a519b63b81986abe76d28887f6984a7732b (diff) | |
download | 7zip-21.07.tar.gz 7zip-21.07.tar.bz2 7zip-21.07.zip |
'21.07'21.07
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 | ||