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