From fc8a07f476648f82abf9934483b04cfee0161e4e Mon Sep 17 00:00:00 2001
From: LAPTOP-T815PCOQ\25526 <mr.liuyang@126.com>
Date: 星期四, 28 十一月 2024 10:44:27 +0800
Subject: [PATCH] 1.扩展静态文本实现回调函数点击事件 2.模拟监听PLC

---
 SourceCode/Bond/BLControlsSDK/include/BLLabel.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/BLControlsSDK/include/BLLabel.h b/SourceCode/Bond/BLControlsSDK/include/BLLabel.h
index 45bc4de..e8f35f8 100644
--- a/SourceCode/Bond/BLControlsSDK/include/BLLabel.h
+++ b/SourceCode/Bond/BLControlsSDK/include/BLLabel.h
@@ -5,6 +5,8 @@
 #pragma once
 #endif // _MSC_VER >= 1000
 
+#include <functional> 
+
 /////////////////////////////////////////////////////////////////////////////
 // CBLLabel window
 enum FlashType { None, Text, Background };
@@ -18,6 +20,8 @@
     // 鏋勯�犱笌鏋愭瀯
     CBLLabel();
     virtual ~CBLLabel();
+
+    void SetClickCallback(std::function<void()> callback); // 璁剧疆鐐瑰嚮浜嬩欢鐨勫洖璋冨嚱鏁�
 
     // 灞炴�ц缃帴鍙�
     CBLLabel& SetBkColor(COLORREF crBkgnd);             // 璁剧疆鑳屾櫙棰滆壊
@@ -55,6 +59,7 @@
     TextAlign m_alignment;        // 鏂囨湰瀵归綈鏂瑰紡
     FlashType m_Type;             // 闂儊绫诲瀷
     HCURSOR  m_hCursor;           // 瓒呴摼鎺ュ厜鏍�
+    std::function<void()> m_clickCallback; // 鐐瑰嚮浜嬩欢鐨勫洖璋冨嚱鏁�
 
 protected:
     // MFC 娑堟伅鏄犲皠

--
Gitblit v1.9.3