• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:
SetImage(WPARAM imageType,HANDLE handle)14   HANDLE SetImage(WPARAM imageType, HANDLE handle) { return (HANDLE)SendMsg(STM_SETIMAGE, imageType, (LPARAM)handle); }
GetImage(WPARAM imageType)15   HANDLE GetImage(WPARAM imageType) { return (HANDLE)SendMsg(STM_GETIMAGE, imageType, 0); }
16 
17   #ifdef UNDER_CE
SetIcon(HICON icon)18   HICON SetIcon(HICON icon) { return (HICON)SetImage(IMAGE_ICON, icon); }
GetIcon()19   HICON GetIcon() { return (HICON)GetImage(IMAGE_ICON); }
20   #else
SetIcon(HICON icon)21   HICON SetIcon(HICON icon) { return (HICON)SendMsg(STM_SETICON, (WPARAM)icon, 0); }
GetIcon()22   HICON GetIcon() { return (HICON)SendMsg(STM_GETICON, 0, 0); }
23   #endif
24 };
25 
26 }}
27 
28 #endif
29