diff options
author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2021-12-27 00:00:00 +0000 |
---|---|---|
committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2022-03-18 15:35:13 +0500 |
commit | f19f813537c7aea1c20749c914e756b54a9c3cf5 (patch) | |
tree | 816ba62ca7c0fa19f2eb46d9e9d6f7dd7c3a744d /CPP/Windows/Control/StatusBar.h | |
parent | 98e06a519b63b81986abe76d28887f6984a7732b (diff) | |
download | 7zip-21.07.tar.gz 7zip-21.07.tar.bz2 7zip-21.07.zip |
'21.07'21.07
Diffstat (limited to '')
-rw-r--r-- | CPP/Windows/Control/StatusBar.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/CPP/Windows/Control/StatusBar.h b/CPP/Windows/Control/StatusBar.h new file mode 100644 index 0000000..988b847 --- /dev/null +++ b/CPP/Windows/Control/StatusBar.h | |||
@@ -0,0 +1,42 @@ | |||
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: | ||
14 | bool Create(LONG style, LPCTSTR text, HWND hwndParent, UINT id) | ||
15 | { return (_window = ::CreateStatusWindow(style, text, hwndParent, id)) != 0; } | ||
16 | bool SetText(LPCTSTR text) | ||
17 | { return CWindow::SetText(text); } | ||
18 | bool SetText(unsigned index, LPCTSTR text, UINT type) | ||
19 | { return LRESULTToBool(SendMsg(SB_SETTEXT, index | type, (LPARAM)text)); } | ||
20 | bool SetText(unsigned index, LPCTSTR text) | ||
21 | { return SetText(index, text, 0); } | ||
22 | |||
23 | #ifndef _UNICODE | ||
24 | bool Create(LONG style, LPCWSTR text, HWND hwndParent, UINT id) | ||
25 | { return (_window = ::CreateStatusWindowW(style, text, hwndParent, id)) != 0; } | ||
26 | bool SetText(LPCWSTR text) | ||
27 | { return CWindow::SetText(text); } | ||
28 | bool SetText(unsigned index, LPCWSTR text, UINT type) | ||
29 | { return LRESULTToBool(SendMsg(SB_SETTEXTW, index | type, (LPARAM)text)); } | ||
30 | bool SetText(unsigned index, LPCWSTR text) | ||
31 | { return SetText(index, text, 0); } | ||
32 | #endif | ||
33 | |||
34 | bool SetParts(unsigned numParts, const int *edgePostions) | ||
35 | { return LRESULTToBool(SendMsg(SB_SETPARTS, numParts, (LPARAM)edgePostions)); } | ||
36 | void Simple(bool simple) | ||
37 | { SendMsg(SB_SIMPLE, BoolToBOOL(simple), 0); } | ||
38 | }; | ||
39 | |||
40 | }} | ||
41 | |||
42 | #endif | ||