diff options
Diffstat (limited to '')
-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 | ||