TransparentStatic.h 656 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. // CTransparentStatic
  3. class CTransparentStatic : public CStatic
  4. {
  5. DECLARE_DYNAMIC(CTransparentStatic)
  6. public:
  7. CTransparentStatic();
  8. virtual ~CTransparentStatic();
  9. virtual CTransparentStatic& SetText(const CString& strText);
  10. virtual CTransparentStatic& SetMyFont(int nSize,const CString& strFont);
  11. virtual CTransparentStatic& SetTextColor(COLORREF crText);
  12. protected:
  13. afx_msg LRESULT OnSetText(WPARAM,LPARAM);
  14. afx_msg HBRUSH CtlColor(CDC* /*pDC*/, UINT /*nCtlColor*/);
  15. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  16. DECLARE_MESSAGE_MAP()
  17. void Update();
  18. private:
  19. CBitmap m_Bmp;
  20. LOGFONT m_lf;
  21. CFont m_font;
  22. COLORREF m_crText;
  23. };