123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #if !defined(AFX_LABELEX_H__C9BE230C_B8E9_48DE_8022_F3D4F5260B65__INCLUDED_)
- #define AFX_LABELEX_H__C9BE230C_B8E9_48DE_8022_F3D4F5260B65__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif
- class CLabelEx : public CStatic
- {
- CFont m_newfont;
- public:
- CLabelEx();
- public:
- public:
-
-
- protected:
- virtual void PreSubclassWindow();
-
- public:
- void Paint();
- int DrawText(CDC *pDC, char *str, CRect& m_rt, int iFont, int iFace, int format);
- int GetStrSize(CDC *pDC, char *str, CSize &size);
- void AutoDraw(CDC *pDC, CRect &StrRect, CString &str, float fscale);
- void AutoDraw2(CDC *pDC, CRect &StrRect, CString &str, float fscale);
- int SetFontFace(CDC *pDC, int iFont, BOOL bWeight, CString name);
- void EnableHighLight(BOOL bHighLight);
- void SetClickedLabelBitmap(UINT ID);
- void SetMouseOverLabelBitmap(UINT ID);
- void SetClickedBGBitmap(UINT ID);
- void SetLabelBitmap(UINT ID);
- void SetMouseOverBGBitmap(UINT ID);
- void SetBGBitmap(UINT ID);
- void RedrawWindow();
- void EnableAutoUnderLine(BOOL bAutoUnderLine);
- void SetBkColor(COLORREF crBkColor);
- void SetBorder(BOOL bBorder,COLORREF crBorder);
- void SetUnderLine(BOOL bUnderLine,COLORREF crUnderLine);
- void SetTextColor(COLORREF crText);
- virtual ~CLabelEx();
-
- protected:
- HCURSOR m_hHandCur;
- CFont m_Font;
- BOOL m_bBorder;
- BOOL m_bClicked;
- BOOL m_bOver;
- BOOL m_bUnderLine,m_bBackUnderLine;
- BOOL m_bAutoUnderLine;
- BOOL m_bHighLight;
- CBitmap m_BGBm,m_MouseOverBGBm,m_ClickedBGBm;
- CBitmap m_LabelBm,m_MouseOverLabelBm,m_ClickedLabelBm;
- COLORREF m_crText,m_crBorder,m_crBG,m_crUnderLine;
- COLORREF m_crBackText;
-
- afx_msg void OnPaint();
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
-
- DECLARE_MESSAGE_MAP()
- };
- #endif
|