From ba50ece48a4b95563031f1dacffd3e04f89d952f Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 21 八月 2025 05:25:41 +0800
Subject: [PATCH] 1.完善可折叠列表;

---
 SourceCode/Bond/Servo/CControlJobDlg.cpp |   68 ++++++++++++++++++++++++++++++++++
 1 files changed, 68 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/CControlJobDlg.cpp b/SourceCode/Bond/Servo/CControlJobDlg.cpp
new file mode 100644
index 0000000..77311e8
--- /dev/null
+++ b/SourceCode/Bond/Servo/CControlJobDlg.cpp
@@ -0,0 +1,68 @@
+锘�// CControlJobDlg.cpp: 瀹炵幇鏂囦欢
+//
+
+#include "stdafx.h"
+#include "Servo.h"
+#include "CControlJobDlg.h"
+#include "afxdialogex.h"
+
+
+// CControlJobDlg 瀵硅瘽妗�
+
+IMPLEMENT_DYNAMIC(CControlJobDlg, CDialogEx)
+
+CControlJobDlg::CControlJobDlg(CWnd* pParent /*=nullptr*/)
+	: CDialogEx(IDD_DIALOG_CONTROL_JOB, pParent)
+{
+
+}
+
+CControlJobDlg::~CControlJobDlg()
+{
+}
+
+void CControlJobDlg::DoDataExchange(CDataExchange* pDX)
+{
+	CDialogEx::DoDataExchange(pDX);
+	DDX_Control(pDX, IDC_LIST1, m_listCtrl);
+}
+
+
+BEGIN_MESSAGE_MAP(CControlJobDlg, CDialogEx)
+END_MESSAGE_MAP()
+
+
+// CControlJobDlg 娑堟伅澶勭悊绋嬪簭
+
+
+BOOL CControlJobDlg::OnInitDialog()
+{
+	CDialogEx::OnInitDialog();
+
+    HIMAGELIST imageList = ImageList_Create(24, 24, ILC_COLOR24, 1, 1);
+    ListView_SetImageList(m_listCtrl.GetSafeHwnd(), imageList, LVSIL_SMALL);
+
+    // m_list 宸茬粡鏄璇濇涓婄殑 CExpandableListCtrl 鎴愬憳锛堟嫋鎺т欢鏀圭被锛�
+    m_listCtrl.ModifyStyle(0, LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS);
+    m_listCtrl.InsertColumn(0, _T("鍚嶇О"), LVCFMT_LEFT, 260);
+    m_listCtrl.InsertColumn(1, _T("鐘舵��"), LVCFMT_LEFT, 120);
+    m_listCtrl.InsertColumn(2, _T("鎻忚堪"), LVCFMT_LEFT, 260);
+
+    auto* root1 = m_listCtrl.InsertRoot({ _T("EFEM"), _T("Ready"), _T("Front End Module") });
+    m_listCtrl.InsertChild(root1, { _T("Slot #1"), _T("OK"), _T("150mm wafer") });
+    m_listCtrl.InsertChild(root1, { _T("Slot #2"), _T("Empty"), _T("") });
+
+    auto* root2 = m_listCtrl.InsertRoot({ _T("Bonder"), _T("Run"), _T("G1+G2 Process") });
+    auto* ch21 = m_listCtrl.InsertChild(root2, { _T("Job A"), _T("Proc"), _T("Step 1") });
+    m_listCtrl.InsertChild(ch21, { _T("SubStep A1"), _T("Done"), _T("Align") });
+    m_listCtrl.InsertChild(ch21, { _T("SubStep A2"), _T("Run"),  _T("Bond") });
+
+    // 鍒濆璁╅《灞傚睍寮�
+    root1->expanded = true;
+    root2->expanded = true;
+
+    m_listCtrl.RebuildVisible();
+
+	return TRUE;  // return TRUE unless you set the focus to a control
+				  // 寮傚父: OCX 灞炴�ч〉搴旇繑鍥� FALSE
+}

--
Gitblit v1.9.3