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