|
1 // Windows/Control/ProgressBar.h |
|
2 |
|
3 #ifndef __WINDOWS_CONTROL_PROGRESSBAR_H |
|
4 #define __WINDOWS_CONTROL_PROGRESSBAR_H |
|
5 |
|
6 #include "Windows/Window.h" |
|
7 #include "Windows/Defs.h" |
|
8 |
|
9 namespace NWindows { |
|
10 namespace NControl { |
|
11 |
|
12 class CProgressBar: public CWindow |
|
13 { |
|
14 public: |
|
15 LRESULT SetPos(int pos) |
|
16 { return SendMessage(PBM_SETPOS, pos, 0); } |
|
17 LRESULT DeltaPos(int increment) |
|
18 { return SendMessage(PBM_DELTAPOS, increment, 0); } |
|
19 UINT GetPos() |
|
20 { return SendMessage(PBM_GETPOS, 0, 0); } |
|
21 LRESULT SetRange(unsigned short minValue, unsigned short maxValue) |
|
22 { return SendMessage(PBM_SETRANGE, 0, MAKELPARAM(minValue, maxValue)); } |
|
23 DWORD SetRange32(int minValue, int maxValue) |
|
24 { return SendMessage(PBM_SETRANGE32, minValue, maxValue); } |
|
25 int SetStep(int aStep) |
|
26 { return SendMessage(PBM_SETSTEP, aStep, 0); } |
|
27 int StepIt() |
|
28 { return SendMessage(PBM_STEPIT, 0, 0); } |
|
29 |
|
30 int GetRange(bool minValue, PPBRANGE range) |
|
31 { return SendMessage(PBM_GETRANGE, BoolToBOOL(minValue), (LPARAM)range); } |
|
32 |
|
33 COLORREF SetBarColor(COLORREF color) |
|
34 { return SendMessage(PBM_SETBARCOLOR, 0, color); } |
|
35 COLORREF SetBackgroundColor(COLORREF color) |
|
36 { return SendMessage(PBM_SETBKCOLOR, 0, color); } |
|
37 }; |
|
38 |
|
39 }} |
|
40 |
|
41 #endif |