Imported Upstream version 9.20
[platform/upstream/7zip.git] / CPP / Windows / Control / Trackbar.h
1 // Windows/Control/Trackbar.h\r
2 \r
3 #ifndef __WINDOWS_CONTROL_TRACKBAR_H\r
4 #define __WINDOWS_CONTROL_TRACKBAR_H\r
5 \r
6 #include "Windows/Window.h"\r
7 #include "Windows/Defs.h"\r
8 \r
9 namespace NWindows {\r
10 namespace NControl {\r
11 \r
12 class CTrackbar: public CWindow\r
13 {\r
14 public:\r
15   void SetRange(int minimum, int maximum, bool redraw = true)\r
16     { SendMessage(TBM_SETRANGE, BoolToBOOL(redraw), MAKELONG(minimum, maximum)); }\r
17   void SetPos(int pos, bool redraw = true)\r
18     { SendMessage(TBM_SETPOS, BoolToBOOL(redraw), pos); }\r
19   void SetTicFreq(int freq)\r
20     { SendMessage(TBM_SETTICFREQ, freq); }\r
21   \r
22   int GetPos()\r
23     { return (int)SendMessage(TBM_GETPOS); }\r
24 };\r
25 \r
26 }}\r
27 \r
28 #endif\r