diff options
Diffstat (limited to 'CPP/Windows/Control/Trackbar.h')
-rw-r--r-- | CPP/Windows/Control/Trackbar.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/CPP/Windows/Control/Trackbar.h b/CPP/Windows/Control/Trackbar.h new file mode 100644 index 0000000..313e0c8 --- /dev/null +++ b/CPP/Windows/Control/Trackbar.h | |||
@@ -0,0 +1,27 @@ | |||
1 | // Windows/Control/Trackbar.h | ||
2 | |||
3 | #ifndef __WINDOWS_CONTROL_TRACKBAR_H | ||
4 | #define __WINDOWS_CONTROL_TRACKBAR_H | ||
5 | |||
6 | #include "../Window.h" | ||
7 | |||
8 | namespace NWindows { | ||
9 | namespace NControl { | ||
10 | |||
11 | class CTrackbar: public CWindow | ||
12 | { | ||
13 | public: | ||
14 | void SetRange(int minimum, int maximum, bool redraw = true) | ||
15 | { SendMsg(TBM_SETRANGE, BoolToBOOL(redraw), MAKELONG(minimum, maximum)); } | ||
16 | void SetPos(int pos, bool redraw = true) | ||
17 | { SendMsg(TBM_SETPOS, BoolToBOOL(redraw), pos); } | ||
18 | void SetTicFreq(int freq) | ||
19 | { SendMsg(TBM_SETTICFREQ, freq); } | ||
20 | |||
21 | int GetPos() | ||
22 | { return (int)SendMsg(TBM_GETPOS); } | ||
23 | }; | ||
24 | |||
25 | }} | ||
26 | |||
27 | #endif | ||