trackbar.h

来自「7-Zip 是一款号称有着现今最高压缩比的压缩软件」· C头文件 代码 · 共 28 行

H
28
字号
// Windows/Control/Trackbar.h

#ifndef __WINDOWS_CONTROL_TRACKBAR_H
#define __WINDOWS_CONTROL_TRACKBAR_H

#include "Windows/Window.h"
#include "Windows/Defs.h"

namespace NWindows {
namespace NControl {

class CTrackbar: public CWindow
{
public:
  void SetRange(int minimum, int maximum, bool redraw = true)
    { SendMessage(TBM_SETRANGE, BoolToBOOL(redraw), MAKELONG(minimum, maximum)); }
  void SetPos(int pos, bool redraw = true)
    { SendMessage(TBM_SETPOS, BoolToBOOL(redraw), pos); }
  void SetTicFreq(int freq)
    { SendMessage(TBM_SETTICFREQ, freq); }
  
  int GetPos()
    { return SendMessage(TBM_GETPOS); }
};

}}

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?