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.

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

mercurial