other-licenses/7zstub/src/Windows/Control/ProgressBar.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial