From 61465900aac50bb595f44abd4fb98752c2e08a34 Mon Sep 17 00:00:00 2001
From: LAPTOP-T815PCOQ\25526 <mr.liuyang@126.com>
Date: 星期四, 09 一月 2025 14:01:58 +0800
Subject: [PATCH] 1. 完成PLC View操作按钮读写
---
SourceCode/Bond/BoounionPLC/PagePlcList.cpp | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/BoounionPLC/PagePlcList.cpp b/SourceCode/Bond/BoounionPLC/PagePlcList.cpp
index a153ccb..3e0cc18 100644
--- a/SourceCode/Bond/BoounionPLC/PagePlcList.cpp
+++ b/SourceCode/Bond/BoounionPLC/PagePlcList.cpp
@@ -35,6 +35,7 @@
ON_WM_CTLCOLOR()
ON_WM_DESTROY()
ON_WM_SIZE()
+ ON_MESSAGE(ID_MSG_TREE_CLICK_ITEM, OnTreeClickItem)
END_MESSAGE_MAP()
@@ -160,6 +161,17 @@
rcItem.Width(), rcItem.Height());
}
+LRESULT CPagePlcList::OnTreeClickItem(WPARAM wParam, LPARAM lParam)
+{
+ HTREEITEM hItem = (HTREEITEM)wParam;
+ ASSERT(hItem);
+ CPLC* pPlc = (CPLC*)m_treeCtrl.GetItemData(hItem);
+ ASSERT(pPlc);
+ theApp.m_model.notifyPtr(RX_CODE_SELECT_PLC, pPlc);
+
+ return 0;
+}
+
void CPagePlcList::ReadPLCList()
{
//m_treeCtrl.InsertItem("PLC1", nullptr, nullptr);
@@ -186,4 +198,4 @@
}
return nullptr;
-}
\ No newline at end of file
+}
--
Gitblit v1.9.3