#pragma once // CTransparentStatic class CTransparentStatic : public CStatic { DECLARE_DYNAMIC(CTransparentStatic) public: CTransparentStatic(); virtual ~CTransparentStatic(); virtual CTransparentStatic& SetText(const CString& strText); virtual CTransparentStatic& SetMyFont(int nSize,const CString& strFont); virtual CTransparentStatic& SetTextColor(COLORREF crText); protected: afx_msg LRESULT OnSetText(WPARAM,LPARAM); afx_msg HBRUSH CtlColor(CDC* /*pDC*/, UINT /*nCtlColor*/); afx_msg BOOL OnEraseBkgnd(CDC* pDC); DECLARE_MESSAGE_MAP() void Update(); private: CBitmap m_Bmp; LOGFONT m_lf; CFont m_font; COLORREF m_crText; };