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/Static.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 'CPP/Windows/Control/Static.h')
-rw-r--r-- | CPP/Windows/Control/Static.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/CPP/Windows/Control/Static.h b/CPP/Windows/Control/Static.h new file mode 100644 index 0000000..5523b2e --- /dev/null +++ b/CPP/Windows/Control/Static.h | |||
@@ -0,0 +1,28 @@ | |||
1 | // Windows/Control/Static.h | ||
2 | |||
3 | #ifndef __WINDOWS_CONTROL_STATIC_H | ||
4 | #define __WINDOWS_CONTROL_STATIC_H | ||
5 | |||
6 | #include "../Window.h" | ||
7 | |||
8 | namespace NWindows { | ||
9 | namespace NControl { | ||
10 | |||
11 | class CStatic: public CWindow | ||
12 | { | ||
13 | public: | ||
14 | HANDLE SetImage(WPARAM imageType, HANDLE handle) { return (HANDLE)SendMsg(STM_SETIMAGE, imageType, (LPARAM)handle); } | ||
15 | HANDLE GetImage(WPARAM imageType) { return (HANDLE)SendMsg(STM_GETIMAGE, imageType, 0); } | ||
16 | |||
17 | #ifdef UNDER_CE | ||
18 | HICON SetIcon(HICON icon) { return (HICON)SetImage(IMAGE_ICON, icon); } | ||
19 | HICON GetIcon() { return (HICON)GetImage(IMAGE_ICON); } | ||
20 | #else | ||
21 | HICON SetIcon(HICON icon) { return (HICON)SendMsg(STM_SETICON, (WPARAM)icon, 0); } | ||
22 | HICON GetIcon() { return (HICON)SendMsg(STM_GETICON, 0, 0); } | ||
23 | #endif | ||
24 | }; | ||
25 | |||
26 | }} | ||
27 | |||
28 | #endif | ||