From bc7f1c4e028e69be51079b59dae4ae5c4d43f5bb Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期六, 31 一月 2026 21:54:56 +0800
Subject: [PATCH] 1.状态指示图,目前灰色表示掉线,绿色表示在线。增加Slot的小点表示有没有料,及加工状态 。 2.增加图示
---
SourceCode/Bond/Servo/CExpandableListCtrl.h | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/CExpandableListCtrl.h b/SourceCode/Bond/Servo/CExpandableListCtrl.h
index 3b5e4d0..faf0692 100644
--- a/SourceCode/Bond/Servo/CExpandableListCtrl.h
+++ b/SourceCode/Bond/Servo/CExpandableListCtrl.h
@@ -2,6 +2,19 @@
#include <vector>
#include <memory>
#include <unordered_map>
+#include <set>
+
+
+// ===== 自定义通知:点击需要弹出全文的单元格 =====
+#ifndef ELCN_SHOWFULLTEXT
+#define ELCN_SHOWFULLTEXT (NM_FIRST - 201)
+struct NMC_ELC_SHOWFULLTEXT {
+ NMHDR hdr; // hwndFrom / idFrom / code = ELCN_SHOWFULLTEXT
+ int iItem; // 行
+ int iSubItem; // 列(0-based)
+ CString text; // 完整文本
+};
+#endif
class CExpandableListCtrl : public CListCtrl
{
@@ -43,6 +56,15 @@
// 若为 FALSE,则选中时仍显示自定义颜色
void SetPreserveSelectionHighlight(BOOL b) { m_preserveSelHighlight = b; }
+ // 清除树
+ void ClearTree();
+
+ // 设置哪些列需要“被截断则通知父窗口显示全文”(0-based列号)
+ void SetPopupFullTextColumns(const std::vector<int>& cols);
+
+ std::set<int> m_popupCols; // 需要通知的列集合
+ bool _IsCellTruncated(int row, int col, const CString& text) const;
+
protected:
virtual void PreSubclassWindow();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
--
Gitblit v1.9.3