From 4ef35bf238fc6f7217e4b6de4aee37192ec503ec Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期三, 17 九月 2025 13:36:27 +0800
Subject: [PATCH] 1.自绘CListCtrl用于ProcessJob的Carrier选择
---
SourceCode/Bond/Servo/CControlJobManagerDlg.cpp | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/CControlJobManagerDlg.cpp b/SourceCode/Bond/Servo/CControlJobManagerDlg.cpp
index e125c68..6783528 100644
--- a/SourceCode/Bond/Servo/CControlJobManagerDlg.cpp
+++ b/SourceCode/Bond/Servo/CControlJobManagerDlg.cpp
@@ -357,6 +357,7 @@
void CControlJobManagerDlg::UpProcessJobId(SERVO::CProcessJob* pJob)
{
+ // 鏇存柊listbox
int count = m_listBox.GetCount();
for (int idx = 0; idx < count; idx++) {
if ((m_listBox.GetItemDataPtr(idx) == (void*)pJob)) {
@@ -371,4 +372,22 @@
}
}
}
+
+ // 鏇存柊鏍戞帶浠�
+ // 閬嶅巻鏍硅妭鐐�
+ HTREEITEM hRoot = m_tree.GetRootItem();
+ while (hRoot) {
+ // 閬嶅巻绗簩灞傚瓙鑺傜偣
+ HTREEITEM hChild = m_tree.GetChildItem(hRoot);
+ while (hChild) {
+ DWORD_PTR data = m_tree.GetItemData(hChild);
+ if ((void*)data == pJob) {
+ m_tree.SetItemText(hChild, pJob->id().c_str());
+ return; // 鎵惧埌灏辫繑鍥�
+ }
+ hChild = m_tree.GetNextSiblingItem(hChild);
+ }
+
+ hRoot = m_tree.GetNextSiblingItem(hRoot);
+ }
}
--
Gitblit v1.9.3