michael@0: // Windows/Control/ProgressBar.h michael@0: michael@0: #ifndef __WINDOWS_CONTROL_PROGRESSBAR_H michael@0: #define __WINDOWS_CONTROL_PROGRESSBAR_H michael@0: michael@0: #include "Windows/Window.h" michael@0: #include "Windows/Defs.h" michael@0: michael@0: namespace NWindows { michael@0: namespace NControl { michael@0: michael@0: class CProgressBar: public CWindow michael@0: { michael@0: public: michael@0: LRESULT SetPos(int pos) michael@0: { return SendMessage(PBM_SETPOS, pos, 0); } michael@0: LRESULT DeltaPos(int increment) michael@0: { return SendMessage(PBM_DELTAPOS, increment, 0); } michael@0: UINT GetPos() michael@0: { return SendMessage(PBM_GETPOS, 0, 0); } michael@0: LRESULT SetRange(unsigned short minValue, unsigned short maxValue) michael@0: { return SendMessage(PBM_SETRANGE, 0, MAKELPARAM(minValue, maxValue)); } michael@0: DWORD SetRange32(int minValue, int maxValue) michael@0: { return SendMessage(PBM_SETRANGE32, minValue, maxValue); } michael@0: int SetStep(int aStep) michael@0: { return SendMessage(PBM_SETSTEP, aStep, 0); } michael@0: int StepIt() michael@0: { return SendMessage(PBM_STEPIT, 0, 0); } michael@0: michael@0: int GetRange(bool minValue, PPBRANGE range) michael@0: { return SendMessage(PBM_GETRANGE, BoolToBOOL(minValue), (LPARAM)range); } michael@0: michael@0: COLORREF SetBarColor(COLORREF color) michael@0: { return SendMessage(PBM_SETBARCOLOR, 0, color); } michael@0: COLORREF SetBackgroundColor(COLORREF color) michael@0: { return SendMessage(PBM_SETBKCOLOR, 0, color); } michael@0: }; michael@0: michael@0: }} michael@0: michael@0: #endif