From 6d106eb1bb92dc235bcbda976ae232729bf52c7c Mon Sep 17 00:00:00 2001
From: LAPTOP-T815PCOQ\25526 <mr.liuyang@126.com>
Date: 星期一, 25 十一月 2024 13:46:15 +0800
Subject: [PATCH] 合并代码

---
 SourceCode/Bond/BLControlsSDK/include/BLLabel.h |  102 +++++++++++++++++++++++---------------------------
 1 files changed, 47 insertions(+), 55 deletions(-)

diff --git a/SourceCode/Bond/BLControlsSDK/include/BLLabel.h b/SourceCode/Bond/BLControlsSDK/include/BLLabel.h
index c0ef631..45bc4de 100644
--- a/SourceCode/Bond/BLControlsSDK/include/BLLabel.h
+++ b/SourceCode/Bond/BLControlsSDK/include/BLLabel.h
@@ -4,74 +4,66 @@
 #if _MSC_VER >= 1000
 #pragma once
 #endif // _MSC_VER >= 1000
-// Label.h : header file
-//
 
 /////////////////////////////////////////////////////////////////////////////
 // CBLLabel window
-enum FlashType {None, Text, Background };
+enum FlashType { None, Text, Background };
+enum TextAlign { AlignLeft, AlignCenter, AlignRight };
 
 class AFX_EXT_CLASS CBLLabel : public CStatic
 {
-// Construction
-public:
-	CBLLabel();
-	CBLLabel& SetBkColor(COLORREF crBkgnd);
-	CBLLabel& SetTextColor(COLORREF crText);
-	CBLLabel& SetText(const CString& strText);
-	CBLLabel& SetFontBold(BOOL bBold);
-	CBLLabel& SetFontName(const CString& strFont);
-	CBLLabel& SetFontUnderline(BOOL bSet);
-	CBLLabel& SetFontItalic(BOOL bSet);
-	CBLLabel& SetFontSize(int nSize);
-	CBLLabel& SetSunken(BOOL bSet);
-	CBLLabel& SetBorder(BOOL bSet);
-	CBLLabel& FlashText(BOOL bActivate);
-	CBLLabel& FlashBackground(BOOL bActivate);
-	CBLLabel& SetLink(BOOL bLink);
-	CBLLabel& SetLinkCursor(HCURSOR hCursor);
+    DECLARE_DYNCREATE(CBLLabel) // 鏀寔鍔ㄦ�佸垱寤�
 
-// Attributes
 public:
+    // 鏋勯�犱笌鏋愭瀯
+    CBLLabel();
+    virtual ~CBLLabel();
+
+    // 灞炴�ц缃帴鍙�
+    CBLLabel& SetBkColor(COLORREF crBkgnd);             // 璁剧疆鑳屾櫙棰滆壊
+    CBLLabel& SetTextColor(COLORREF crText);            // 璁剧疆鏂囨湰棰滆壊
+    CBLLabel& SetText(const CString& strText);          // 璁剧疆鏂囨湰鍐呭
+    CBLLabel& SetFontBold(BOOL bBold);                  // 璁剧疆瀛椾綋鍔犵矖
+    CBLLabel& SetFontName(const CString& strFont);      // 璁剧疆瀛椾綋鍚嶇О
+    CBLLabel& SetFontUnderline(BOOL bSet);              // 璁剧疆涓嬪垝绾�
+    CBLLabel& SetFontItalic(BOOL bSet);                 // 璁剧疆鏂滀綋
+    CBLLabel& SetFontSize(int nSize);                   // 璁剧疆瀛椾綋澶у皬
+    CBLLabel& SetAlignment(TextAlign alignment);        // 璁剧疆鏂囨湰瀵归綈鏂瑰紡
+    CBLLabel& SetDynamicFont(BOOL bDynamic);            // 璁剧疆鏄惁鍔ㄦ�佽皟鏁村瓧浣�
+    CBLLabel& FlashText(BOOL bActivate);                // 闂儊鏂囨湰
+    CBLLabel& FlashBackground(BOOL bActivate);          // 闂儊鑳屾櫙
+    CBLLabel& SetLink(BOOL bLink);                      // 璁剧疆鏄惁鍚敤瓒呴摼鎺�
+    CBLLabel& SetLinkCursor(HCURSOR hCursor);           // 璁剧疆瓒呴摼鎺ュ厜鏍�
+
 protected:
-	void ReconstructFont();
-	COLORREF	m_crText;
-	HBRUSH		m_hBrush;
-	HBRUSH		m_hwndBrush;
-	LOGFONT		m_lf;
-	CFont		m_font;
-	CString		m_strText;
-	BOOL		m_bState;
-	BOOL		m_bTimer;
-	BOOL		m_bLink;
-	FlashType	m_Type;
-	HCURSOR		m_hCursor;
-			// Operations
-public:
-// Overrides
-	// ClassWizard generated virtual function overrides
-	//{{AFX_VIRTUAL(CBLLabel)
-	//}}AFX_VIRTUAL
+    // 宸ュ叿鍑芥暟
+    void ReconstructFont();       // 閲嶆柊鏋勯�犲瓧浣�
+    void UpdateFontSize();        // 鍔ㄦ�佽皟鏁村瓧浣撳ぇ灏�
+    virtual void OnPaint();       // 鑷畾涔夌粯鍒舵枃鏈�
 
-// Implementation
-public:
-	virtual ~CBLLabel();
+    // 灞炴��
+    COLORREF m_crText;            // 鏂囨湰棰滆壊
+    COLORREF m_crBkColor;         // 鑳屾櫙棰滆壊
+    HBRUSH   m_hBrush;            // 鑳屾櫙鐢诲埛
+    LOGFONT  m_lf;                // 瀛椾綋淇℃伅
+    CFont    m_font;              // 瀛椾綋瀵硅薄
+    CString  m_strText;           // 鏂囨湰鍐呭
+    BOOL     m_bState;            // 鐘舵�侊紝鐢ㄤ簬闂儊
+    BOOL     m_bTimer;            // 瀹氭椂鍣ㄧ姸鎬�
+    BOOL     m_bLink;             // 鏄惁涓鸿秴閾炬帴
+    BOOL     m_bDynamicFont;      // 鏄惁鍔ㄦ�佽皟鏁村瓧浣撳ぇ灏�
+    TextAlign m_alignment;        // 鏂囨湰瀵归綈鏂瑰紡
+    FlashType m_Type;             // 闂儊绫诲瀷
+    HCURSOR  m_hCursor;           // 瓒呴摼鎺ュ厜鏍�
 
-	// Generated message map functions
 protected:
-	//{{AFX_MSG(CBLLabel)
-	afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
-	afx_msg void OnTimer(UINT_PTR nIDEvent);
-	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
-	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
-	//}}AFX_MSG
+    // MFC 娑堟伅鏄犲皠
+    virtual HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);  // 鑳屾櫙鍜屾枃鏈鑹茶缃�
+    afx_msg void OnTimer(UINT_PTR nIDEvent);            // 瀹氭椂鍣ㄤ簨浠�
+    afx_msg void OnLButtonDown(UINT nFlags, CPoint point); // 榧犳爣鐐瑰嚮浜嬩欢
+    afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); // 璁剧疆鍏夋爣浜嬩欢
 
-	DECLARE_MESSAGE_MAP()
+    DECLARE_MESSAGE_MAP()
 };
-
-/////////////////////////////////////////////////////////////////////////////
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
 
 #endif // !defined(AFX_BLLABEL_H__A4EABEC5_2E8C_11D1_B79F_00805F9ECE10__INCLUDED_)

--
Gitblit v1.9.3