1*f6dc9357SAndroid Build Coastguard Worker // Windows/Control/StatusBar.h 2*f6dc9357SAndroid Build Coastguard Worker 3*f6dc9357SAndroid Build Coastguard Worker #ifndef ZIP7_INC_WINDOWS_CONTROL_STATUSBAR_H 4*f6dc9357SAndroid Build Coastguard Worker #define ZIP7_INC_WINDOWS_CONTROL_STATUSBAR_H 5*f6dc9357SAndroid Build Coastguard Worker 6*f6dc9357SAndroid Build Coastguard Worker #include "../Window.h" 7*f6dc9357SAndroid Build Coastguard Worker 8*f6dc9357SAndroid Build Coastguard Worker namespace NWindows { 9*f6dc9357SAndroid Build Coastguard Worker namespace NControl { 10*f6dc9357SAndroid Build Coastguard Worker 11*f6dc9357SAndroid Build Coastguard Worker class CStatusBar: public NWindows::CWindow 12*f6dc9357SAndroid Build Coastguard Worker { 13*f6dc9357SAndroid Build Coastguard Worker public: Create(LONG style,LPCTSTR text,HWND hwndParent,UINT id)14*f6dc9357SAndroid Build Coastguard Worker bool Create(LONG style, LPCTSTR text, HWND hwndParent, UINT id) 15*f6dc9357SAndroid Build Coastguard Worker { return (_window = ::CreateStatusWindow(style, text, hwndParent, id)) != NULL; } SetText(LPCTSTR text)16*f6dc9357SAndroid Build Coastguard Worker bool SetText(LPCTSTR text) 17*f6dc9357SAndroid Build Coastguard Worker { return CWindow::SetText(text); } SetText(unsigned index,LPCTSTR text,UINT type)18*f6dc9357SAndroid Build Coastguard Worker bool SetText(unsigned index, LPCTSTR text, UINT type) 19*f6dc9357SAndroid Build Coastguard Worker { return LRESULTToBool(SendMsg(SB_SETTEXT, index | type, (LPARAM)text)); } SetText(unsigned index,LPCTSTR text)20*f6dc9357SAndroid Build Coastguard Worker bool SetText(unsigned index, LPCTSTR text) 21*f6dc9357SAndroid Build Coastguard Worker { return SetText(index, text, 0); } 22*f6dc9357SAndroid Build Coastguard Worker 23*f6dc9357SAndroid Build Coastguard Worker #ifndef _UNICODE Create(LONG style,LPCWSTR text,HWND hwndParent,UINT id)24*f6dc9357SAndroid Build Coastguard Worker bool Create(LONG style, LPCWSTR text, HWND hwndParent, UINT id) 25*f6dc9357SAndroid Build Coastguard Worker { return (_window = ::CreateStatusWindowW(style, text, hwndParent, id)) != NULL; } SetText(LPCWSTR text)26*f6dc9357SAndroid Build Coastguard Worker bool SetText(LPCWSTR text) 27*f6dc9357SAndroid Build Coastguard Worker { return CWindow::SetText(text); } SetText(unsigned index,LPCWSTR text,UINT type)28*f6dc9357SAndroid Build Coastguard Worker bool SetText(unsigned index, LPCWSTR text, UINT type) 29*f6dc9357SAndroid Build Coastguard Worker { return LRESULTToBool(SendMsg(SB_SETTEXTW, index | type, (LPARAM)text)); } SetText(unsigned index,LPCWSTR text)30*f6dc9357SAndroid Build Coastguard Worker bool SetText(unsigned index, LPCWSTR text) 31*f6dc9357SAndroid Build Coastguard Worker { return SetText(index, text, 0); } 32*f6dc9357SAndroid Build Coastguard Worker #endif 33*f6dc9357SAndroid Build Coastguard Worker SetParts(unsigned numParts,const int * edgePostions)34*f6dc9357SAndroid Build Coastguard Worker bool SetParts(unsigned numParts, const int *edgePostions) 35*f6dc9357SAndroid Build Coastguard Worker { return LRESULTToBool(SendMsg(SB_SETPARTS, numParts, (LPARAM)edgePostions)); } Simple(bool simple)36*f6dc9357SAndroid Build Coastguard Worker void Simple(bool simple) 37*f6dc9357SAndroid Build Coastguard Worker { SendMsg(SB_SIMPLE, (WPARAM)BoolToBOOL(simple), 0); } 38*f6dc9357SAndroid Build Coastguard Worker }; 39*f6dc9357SAndroid Build Coastguard Worker 40*f6dc9357SAndroid Build Coastguard Worker }} 41*f6dc9357SAndroid Build Coastguard Worker 42*f6dc9357SAndroid Build Coastguard Worker #endif 43