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