no message

This commit is contained in:
zcy 2022-01-13 23:28:29 +08:00
parent 511f3432b4
commit c4be61a7d7
2 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,5 @@
#include "stdafx.h"
#include "controls_form.h"
#include "Utils\DpiManager.h"
#include <fstream>

View File

@ -127,11 +127,13 @@ LRESULT BasicForm::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
TcpServerInfo* info = (TcpServerInfo*)wParam;
TcpServerLibevent* server = (TcpServerLibevent*)lParam;
ui::TreeNode* node = new ui::TreeNode;
mMonitor->GetRootNode()->GetChildNode(2)->AddChildNode(node);
auto key = info->ip + L":" + std::to_wstring(info->port);
node->SetText(key);
node->SetClass(L"listitem");
node->SetFixedHeight(20);
std::cout << "node heigjt" << node->GetHeight();
mMonitor->GetRootNode()->GetChildNode(2)->AddChildNode(node);
gTcpServerCnt++;
printf("WM_ADD_TCPSERVER_MONITOR\r\n");
@ -260,38 +262,41 @@ void BasicForm::InitWindow(){
node->SetText(nbase::StringPrintf(L"uart"));
node->SetClass(L"list_topitem");
node->SetFixedHeight(30);
node->SetFont(L"arial_22");
mMonitor->GetRootNode()->AddChildNode(node);
node = new ui::TreeNode;
node->SetText(nbase::StringPrintf(L"tcp client"));
node->SetClass(L"list_topitem");
node->SetFont(L"arial_22");
node->SetFixedHeight(30);
mMonitor->GetRootNode()->AddChildNode(node);
node = new ui::TreeNode;
node->SetText(nbase::StringPrintf(L"tcp server"));
node->SetClass(L"list_topitem");
node->SetFixedHeight(30);
node->SetFont(L"arial_22");
mMonitor->GetRootNode()->AddChildNode(node);
node = new ui::TreeNode;
node->SetText(nbase::StringPrintf(L"udp client"));
node->SetClass(L"list_topitem");
node->SetFixedHeight(30);
node->SetFont(L"arial_22");
mMonitor->GetRootNode()->AddChildNode(node);
node = new ui::TreeNode;
node->SetText(nbase::StringPrintf(L"udp server"));
node->SetClass(L"list_topitem");
node->SetFixedHeight(30);
node->SetFont(L"arial_22");
mMonitor->GetRootNode()->AddChildNode(node);
node = new ui::TreeNode;
node->SetText(nbase::StringPrintf(L"udp group"));
node->SetClass(L"list_topitem");
node->SetFixedHeight(30);
node->SetFont(L"arial_22");
mMonitor->GetRootNode()->AddChildNode(node);
}