Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.3 KiB

  1. // File: statbar.h
  2. #ifndef _STATBAR_H_
  3. #define _STATBAR_H_
  4. #include "ConfRoom.h"
  5. class CConfStatusBar
  6. {
  7. protected:
  8. static CConfStatusBar * m_pStatusBar;
  9. public:
  10. static CConfStatusBar * GetInstance() { return m_pStatusBar; }
  11. private:
  12. enum StatIcon
  13. {
  14. StatConnect = 0,
  15. StatLogin,
  16. StatIconCount
  17. } ;
  18. HWND m_hwnd;
  19. HWND m_hwndLoginTT; // The tooltip window
  20. HICON m_hIconStatus[StatIconCount]; // handle to status bar icon
  21. DWORD m_idIconStatus[StatIconCount]; // id of current status bar icon
  22. CConfRoom* m_pcrParent;
  23. TCHAR m_szULSStatus[MAX_PATH];
  24. BOOL m_fVisible : 1; // TRUE if status bar displayed
  25. VOID SetIcon(StatIcon eIcon, DWORD dwId);
  26. VOID SetText(UINT uID, LPCTSTR sz);
  27. void SetTooltip(StatIcon eIcon, LPCTSTR szTip);
  28. public:
  29. CConfStatusBar(CConfRoom* pcr);
  30. ~CConfStatusBar();
  31. VOID Update();
  32. int GetHeight();
  33. BOOL Create(HWND hwndParent);
  34. VOID Show(BOOL fShow);
  35. VOID ResizeParts();
  36. VOID Resize(WPARAM wParam, LPARAM lParam);
  37. BOOL OnDraw(LPDRAWITEMSTRUCT pdis);
  38. VOID RemoveHelpText();
  39. VOID SetHelpText(LPCTSTR pcszText);
  40. BOOL FVisible() { return (m_fVisible != FALSE); }
  41. HWND GetHwnd() { return m_hwnd; }
  42. VOID ForwardSysChangeMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
  43. };
  44. #endif // _STATBAR_H_