From bcbf890ebd3b77521b130898a49f5ca2f0fad4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9D=BF=20=E5=AE=89?= Date: Tue, 27 Jan 2026 17:45:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A1=A8=E6=A0=BC=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E5=89=8D=E7=9A=84=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 16 ++++++++-------- demo/Adminstor/Adminstor/mainForm.cpp | 3 ++- demo/Adminstor/Adminstor/mainForm.h | 6 ++++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 95f74f9..921db2b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,20 +9,20 @@ EzUI 是一个基于原生 Win32 消息机制和 Direct2D 的 C++ 桌面 UI 框 ## 构建命令 ```bash -build.bat # 构建 32 位静态库 -build64.bat # 构建 64 位静态库 +build_x86.bat # 构建 32 位静态库 +build_x64.bat # 构建 64 位静态库 ``` CMake 构建: ```bash -cmake -B build +cmake -B build # 默认静态库 cmake --build build -``` -静态库/动态库切换: -```bash -cmake -B build -DBUILD_SHARED_LIBS=ON # 动态库 -cmake -B build -DBUILD_SHARED_LIBS=OFF # 静态库(默认) +# 动态库 +cmake -B build -DBUILD_SHARED_LIBS=ON + +# 仅构建库(不构建 demo) +cmake -B build -DBUILD_DEMO=OFF ``` ## 核心架构 diff --git a/demo/Adminstor/Adminstor/mainForm.cpp b/demo/Adminstor/Adminstor/mainForm.cpp index fda42b5..960a0c8 100644 --- a/demo/Adminstor/Adminstor/mainForm.cpp +++ b/demo/Adminstor/Adminstor/mainForm.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "mainForm.h" + void mainForm::OnNotify(Control* sender, EventArgs& args) { UIString btnName = sender->Name; // 控件id @@ -49,9 +50,9 @@ void mainForm::OnNotify(Control* sender, EventArgs& args) } else if (btnName == "btnAdminTemp") { //管理页面的测试按钮 TextBox* textAdmin = (TextBox*)FindControl("textAdminOutput"); //获取输出框 - //textAdmin->Insert(L"\n测试成功!", true); if (textAdmin) { textAdmin->Insert(L"\n测试成功!",true); + textAdmin->GetScrollBar()->ScrollTo(1.0); } } } diff --git a/demo/Adminstor/Adminstor/mainForm.h b/demo/Adminstor/Adminstor/mainForm.h index ca6af80..10b2a16 100644 --- a/demo/Adminstor/Adminstor/mainForm.h +++ b/demo/Adminstor/Adminstor/mainForm.h @@ -4,17 +4,19 @@ using namespace ezui; + // 主窗口 class mainForm :public LayeredWindow { private: - //ui管理类 - UIManager umg; protected: virtual void OnNotify(Control* sender, EventArgs& args)override;//重载事件通知 virtual void OnClose(bool& close)override;//当窗口关闭的时候 public: + //ui管理类 + UIManager umg; mainForm(); virtual ~mainForm(); + };