From 8e14271d976826c5ef727a1c86acc2da4ecad14a Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 11 三月 2025 09:53:41 +0800
Subject: [PATCH] 1.修复窗口最大化时,屏幕残留黑块的问题; 2.左侧master面板,未加载时显示"Loading..."

---
 SourceCode/Bond/Servo/ServoDlg.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index bfed47e..b29713e 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -658,6 +658,7 @@
 		CRect rcWnd;
 		GetWindowRect(&rcWnd);
 		int nHeight = GetSystemMetrics(SM_CYSCREEN) - rcWnd.bottom - 38;
+		if (nHeight < 280) nHeight = 280;
 		m_pAlarmDlg->MoveWindow(rcWnd.left, rcWnd.bottom - 8, rcWnd.Width(), nHeight);
 	}
 	ASSERT(m_pAlarmDlg);
@@ -686,11 +687,12 @@
 		CRect rcWnd;
 		GetWindowRect(&rcWnd);
 		int nHeight = GetSystemMetrics(SM_CYSCREEN) - rcWnd.bottom - 38;
+		if (nHeight < 280) nHeight = 280;
 		m_pLogDlg->MoveWindow(rcWnd.left, rcWnd.bottom - 8, rcWnd.Width(), nHeight);
 	}
 	ASSERT(m_pLogDlg);
 	m_pLogDlg->ShowWindow(m_bShowLogWnd ? SW_SHOW : SW_HIDE);
-
+	
 	UpdateLogBtn();
 }
 
@@ -853,6 +855,7 @@
 	CDialogEx::OnSize(nType, cx, cy);
 	if (GetDlgItem(IDC_SERVO_GRAPH1) == nullptr) return;
 	Resize();
+	Invalidate();
 }
 
 void CServoDlg::Resize()
@@ -945,13 +948,13 @@
 	if (m_pLogDlg != nullptr && !m_pLogDlg->IsZoomed()) {
 		CRect rcWnd;
 		GetWindowRect(&rcWnd);
-		m_pLogDlg->MoveWindow(rcWnd.left, rcWnd.bottom - 8, rcWnd.Width(), 200);
+		m_pLogDlg->SetWindowPos(nullptr, rcWnd.left, rcWnd.bottom - 8, 0, 0, SWP_NOSIZE);
 	}
 
 	if (m_pAlarmDlg != nullptr && !m_pAlarmDlg->IsZoomed()) {
 		CRect rcWnd;
 		GetWindowRect(&rcWnd);
-		m_pAlarmDlg->MoveWindow(rcWnd.left, rcWnd.bottom - 8, rcWnd.Width(), 200);
+		m_pAlarmDlg->SetWindowPos(nullptr, rcWnd.left, rcWnd.bottom - 8, 0, 0, SWP_NOSIZE);
 	}
 
 	CDialogEx::OnMove(x, y);

--
Gitblit v1.9.3