1 #pragma once 2 #include "ColorConvert.h" 3 4 // CPlayerProgressBar 5 6 class CPlayerProgressBar : public CStatic 7 { 8 DECLARE_DYNAMIC(CPlayerProgressBar) 9 10 public: 11 CPlayerProgressBar(); 12 virtual ~CPlayerProgressBar(); 13 14 void SetProgress(int progress); 15 void SetBackgroundColor(COLORREF back_color); 16 void SetBarCount(int bar_cnt); 17 18 protected: 19 int m_progress; //当前进度(百分比) 20 const ColorTable& m_theme_color; 21 COLORREF m_back_color{ RGB(255, 255, 255) }; 22 int m_bar_count{ 10 }; 23 24 protected: 25 DECLARE_MESSAGE_MAP() 26 afx_msg void OnPaint(); 27 }; 28 29 30