00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CMSWINDOWSCLIENTTASKBARRECEIVER_H
00016 #define CMSWINDOWSCLIENTTASKBARRECEIVER_H
00017
00018 #define WIN32_LEAN_AND_MEAN
00019
00020 #include "CClientTaskBarReceiver.h"
00021 #include <windows.h>
00022
00023 class CBufferedLogOutputter;
00024
00026 class CMSWindowsClientTaskBarReceiver : public CClientTaskBarReceiver {
00027 public:
00028 CMSWindowsClientTaskBarReceiver(HINSTANCE, const CBufferedLogOutputter*);
00029 virtual ~CMSWindowsClientTaskBarReceiver();
00030
00031
00032 virtual void showStatus();
00033 virtual void runMenu(int x, int y);
00034 virtual void primaryAction();
00035 virtual const Icon getIcon() const;
00036
00037 protected:
00038 void copyLog() const;
00039
00040
00041 virtual void onStatusChanged();
00042
00043 private:
00044 HICON loadIcon(UINT);
00045 void deleteIcon(HICON);
00046 void createWindow();
00047 void destroyWindow();
00048
00049 BOOL dlgProc(HWND hwnd,
00050 UINT msg, WPARAM wParam, LPARAM lParam);
00051 static BOOL CALLBACK
00052 staticDlgProc(HWND hwnd,
00053 UINT msg, WPARAM wParam, LPARAM lParam);
00054
00055 private:
00056 HINSTANCE m_appInstance;
00057 HWND m_window;
00058 HMENU m_menu;
00059 HICON m_icon[kMaxState];
00060 const CBufferedLogOutputter* m_logBuffer;
00061 static const UINT s_stateToIconID[];
00062 };
00063
00064 #endif