#pragma once // CStaticEx class CStaticEx : public CStatic { // DECLARE_DYNAMIC(CStaticEx) public: CStaticEx(); virtual ~CStaticEx(); private: HBRUSH m_bkBrush; COLORREF crCtlColor; COLORREF crTextColor; // Attributes public: void SetCtlColor(COLORREF color); void SetBkColor(COLORREF color) { SetCtlColor( color); }; protected: DECLARE_MESSAGE_MAP() public: // afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); public: afx_msg HBRUSH CtlColor(CDC* /*pDC*/, UINT /*nCtlColor*/); public: void SetTextColor(COLORREF color); public: int bCtlColorDef; public: int bTextColorDef; public: void SetTextSize(int size); public: CFont pFont1; };