From af08046fe1cddba171826f619d823dee02a79ca0 Mon Sep 17 00:00:00 2001
From: LAPTOP-T815PCOQ\25526 <mr.liuyang@126.com>
Date: 星期三, 27 十一月 2024 16:38:37 +0800
Subject: [PATCH] 1. 添加IO模块,包括界面和管理类

---
 SourceCode/Bond/BondEq/View/UserManagerDlg.cpp |   19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp b/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp
index 9daa3d1..10dddbd 100644
--- a/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp
+++ b/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp
@@ -440,23 +440,10 @@
 	int fontSize = nHeight / 2;
 	if (fontSize < 8) fontSize = 8;
 
-	// 妫�鏌ュ瓧浣撴槸鍚﹀凡缁忓瓨鍦�
-	auto it = m_mapFonts.find(fontSize);
-	if (it == m_mapFonts.end()) {
-		// 鍔ㄦ�佸垱寤烘柊瀛椾綋
-		CFont* newFont = new CFont();
-		LOGFONT logFont = { 0 };
-		_tcscpy_s(logFont.lfFaceName, _T("Segoe UI"));
-		logFont.lfHeight = -fontSize;
-		logFont.lfQuality = CLEARTYPE_QUALITY; // 鍚敤 ClearType 鎶楅敮榻�
-		newFont->CreateFontIndirect(&logFont);
+	// 鑾峰彇鎴栧垱寤哄瓧浣�
+	CFont* pFont = GetOrCreateFont(fontSize);
 
-		// 瀛樺偍鍒板瓧浣撶鐞嗗鍣ㄤ腑
-		m_mapFonts[fontSize] = newFont;
-		it = m_mapFonts.find(fontSize);
-	}
-
-	pWnd->SetFont(it->second);
+	pWnd->SetFont(pFont);
 	pWnd->Invalidate(); // 鍒锋柊鎺т欢鏄剧ず
 }
 

--
Gitblit v1.9.3