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