From 6fc65c5cf54432d1044fbe9799aca76f7273798c Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 23 五月 2025 18:02:27 +0800
Subject: [PATCH] Merge branch 'clh'

---
 SourceCode/Bond/Servo/Servo.cpp |   42 +++++++++++++++++++++++-------------------
 1 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/SourceCode/Bond/Servo/Servo.cpp b/SourceCode/Bond/Servo/Servo.cpp
index 5866c64..3b5e1c5 100644
--- a/SourceCode/Bond/Servo/Servo.cpp
+++ b/SourceCode/Bond/Servo/Servo.cpp
@@ -52,7 +52,7 @@
 
 BOOL CServoApp::InitInstance()
 {
-	// 如果一个运行在 Windows XP 上的应用程序清单指定要
+	// TODO: 调用 AfxInitRichEdit2() 以初始化 richedit2 库。\n"	// 如果一个运行在 Windows XP 上的应用程序清单指定要
 	// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
 	//则需要 InitCommonControlsEx()。  否则,将无法创建窗口。
 	INITCOMMONCONTROLSEX InitCtrls;
@@ -113,6 +113,10 @@
 	InitGDIPlus();
 
 
+	// 初始化 MFC RichEdit 控件
+	AfxInitRichEdit2();
+
+
 	// 初始化报警管理器
 	try {
 		if (!AlarmManager::getInstance().initAlarmTable()) {
@@ -130,35 +134,35 @@
 
 
 	// 初始化生产履历管理器
-	try {
-		if (!ProductionLogManager::getInstance().initProductionTable()) {
-			AfxMessageBox("初始化生产履历管理器失败!");
-			return FALSE;
-		}
-	}
-	catch (const std::exception& ex) {
-		CString errorMsg;
-		errorMsg.Format(_T("初始化生产履历管理器失败:%s"), CString(ex.what()));
-		AfxMessageBox(errorMsg, MB_ICONERROR);
-		return FALSE;
-	}
-
-
-	// 初始化SECS运行设置管理库
 	//try {
-	//	if (!SECSRuntimeManager::getInstance().initRuntimeSetting()) {
-	//		AfxMessageBox("初始化SECS运行设置失败!");
+	//	if (!ProductionLogManager::getInstance().initProductionTable()) {
+	//		AfxMessageBox("初始化生产履历管理器失败!");
 	//		return FALSE;
 	//	}
 	//}
 	//catch (const std::exception& ex) {
 	//	CString errorMsg;
-	//	errorMsg.Format(_T("初始化SECS运行设置失败:%s"), CString(ex.what()));
+	//	errorMsg.Format(_T("初始化生产履历管理器失败:%s"), CString(ex.what()));
 	//	AfxMessageBox(errorMsg, MB_ICONERROR);
 	//	return FALSE;
 	//}
 
 
+	// 初始化SECS运行设置管理库
+	try {
+		if (!SECSRuntimeManager::getInstance().initRuntimeSetting()) {
+			AfxMessageBox("初始化SECS运行设置失败!");
+			return FALSE;
+		}
+	}
+	catch (const std::exception& ex) {
+		CString errorMsg;
+		errorMsg.Format(_T("初始化SECS运行设置失败:%s"), CString(ex.what()));
+		AfxMessageBox(errorMsg, MB_ICONERROR);
+		return FALSE;
+	}
+
+
 	CServoDlg dlg;
 	m_pMainWnd = &dlg;
 	INT_PTR nResponse = dlg.DoModal();

--
Gitblit v1.9.3