| | |
| | | |
| | | 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)) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 更新树控件 |
| | | // 遍历根节点 |
| | | 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); |
| | | } |
| | | } |