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(); + };