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