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.

91 lines
2.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: statbar.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _STATBAR_H
  11. #define _STATBAR_H
  12. #ifndef __DOCKSITE_H__
  13. #include "docksite.h"
  14. #endif
  15. class CAMCProgressCtrl : public CProgressCtrl
  16. {
  17. public:
  18. CAMCProgressCtrl();
  19. void SetRange( int nLower, int nUpper );
  20. void GetRange( int * nLower, int * nUpper );
  21. int SetPos ( int nPos);
  22. private:
  23. int nLower, nUpper;
  24. };
  25. class CAMCStatusBar : public CStatBar
  26. {
  27. DECLARE_DYNAMIC (CAMCStatusBar)
  28. static const TCHAR DELINEATOR[];
  29. static const TCHAR PROGRESSBAR[];
  30. enum eFieldSize
  31. {
  32. eStatusFields = 3
  33. };
  34. // Constructor/Destructors
  35. public:
  36. CAMCStatusBar();
  37. ~CAMCStatusBar();
  38. // Overrides
  39. // ClassWizard generated virtual function overrides
  40. //{{AFX_VIRTUAL(CAMCStatusBar)
  41. //}}AFX_VIRTUAL
  42. // usable only by CAMCStatusBarText
  43. protected:
  44. //{{AFX_MSG(CAMCStatusBar)
  45. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  46. afx_msg void OnSize(UINT nType, int cx, int cy);
  47. //}}AFX_MSG
  48. afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
  49. afx_msg LPARAM OnSetText(WPARAM wParam, LPARAM lParam);
  50. afx_msg LPARAM OnSBSetText(WPARAM wParam, LPARAM lParam);
  51. public:
  52. DECLARE_MESSAGE_MAP()
  53. // Progress bar child control
  54. public:
  55. CAMCProgressCtrl m_progressControl;
  56. CStatic m_staticControl;
  57. // internal
  58. private:
  59. CTypedPtrList<CPtrList, CString*> m_TextList;
  60. CCriticalSection m_Critsec;
  61. DWORD m_iNumStatusText;
  62. CFont m_StaticFont;
  63. void Update();
  64. void Parse(LPCTSTR strText);
  65. void SetStatusBarFont();
  66. public:
  67. CAMCProgressCtrl* GetStatusProgressCtrlHwnd()
  68. { return (&m_progressControl); }
  69. CStatic* GetStatusStaticCtrlHwnd()
  70. { return (&m_staticControl); }
  71. };
  72. #endif // _STATBAR_H