// ColorText_Static.h : header file#pragma once/////////////////////////////////////////////////////////////////////////////// CColorText_Static windowclass CColorText_Static : public CStatic{// Attributesprivate: BOOL b_FillBackColor; COLORREF m_DisBackColro; COLORREF m_BackColor; COLORREF m_TextColor; CFont *m_Font; CBrush m_BackBrush; CBrush m_DisBackBrush;// Constructionpublic: CFont *GetFont() { return m_Font; } CColorText_Static(); virtual void SetFont(LOGFONT *LogFont, BOOL bRedraw = TRUE); virtual void SetFont(CFont* pFont, BOOL bRedraw = TRUE); virtual void SetFont(int nHeight, LPCTSTR fontName, BOOL bRedraw = true); void Set_BackColor(COLORREF cr); COLORREF Get_BackColor() { return(m_BackColor); }; void Set_TextColor(COLORREF cr) { m_TextColor = cr; if(GetSafeHwnd()) Invalidate(); } COLORREF Get_TextColor() { return(m_TextColor); }// Attributespublic:// Operationspublic:// Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CColorText_Static) //}}AFX_VIRTUAL// Implementationpublic: virtual ~CColorText_Static(); // Generated message map functionsprotected: //{{AFX_MSG(CColorText_Static) afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor); afx_msg BOOL OnEraseBkgnd(CDC* pDC); //}}AFX_MSG DECLARE_MESSAGE_MAP()};/////////////////////////////////////////////////////////////////////////////// ColorText_Static.h : header file#pragma once 你的当前访问异常,请进行认证后继续阅读剩余内容。 提交