00001 //Screws up if i uncomment theses, don't know why 00002 //#ifndef TRAYICON_H 00003 //#define TRAYICON_H 00004 00005 #include "Component.h" 00006 00007 namespace wkgl { 00008 00021 class TrayIcon : public Component 00022 { 00023 protected: 00024 NOTIFYICONDATA ndata; 00025 HICON curicon; 00026 bool showing; 00027 static UINT uid_inc; 00028 00029 public: 00033 TrayIcon( Component *parent, HICON icon, const char *tooltip = NULL ); 00034 00038 TrayIcon( Component *parent, const char *iconfile, 00039 const char *tooltip = NULL ); 00040 00044 ~TrayIcon(); 00045 00049 BOOL show(); 00050 00054 BOOL hide(); 00055 00059 BOOL isShowing(); 00060 00064 BOOL setIcon( HICON icon ); 00065 00069 BOOL setIcon( const char *iconfile ); 00070 00074 BOOL setTooltip( const char *tooltip ); 00075 00076 protected: 00080 void destroyLoadedIcon(); 00081 00085 BOOL commitChanges(); 00086 00090 void setFlags(); 00091 00092 private: 00093 void init( Component *parent ); 00094 }; 00095 } 00096 //#endif
1.2.18