diff --git a/demo/Adminstor/Adminstor/Adminstor.vcxproj b/demo/Adminstor/Adminstor/Adminstor.vcxproj
index 7f6ec2d..cf5725c 100644
--- a/demo/Adminstor/Adminstor/Adminstor.vcxproj
+++ b/demo/Adminstor/Adminstor/Adminstor.vcxproj
@@ -177,12 +177,14 @@
+
+
Create
Create
diff --git a/demo/Adminstor/Adminstor/Adminstor.vcxproj.filters b/demo/Adminstor/Adminstor/Adminstor.vcxproj.filters
index 1f2e86f..5b9220b 100644
--- a/demo/Adminstor/Adminstor/Adminstor.vcxproj.filters
+++ b/demo/Adminstor/Adminstor/Adminstor.vcxproj.filters
@@ -27,6 +27,9 @@
头文件
+
+ 头文件
+
@@ -38,6 +41,9 @@
源文件
+
+ 源文件
+
diff --git a/demo/Adminstor/Adminstor/DemoUi.aps b/demo/Adminstor/Adminstor/DemoUi.aps
new file mode 100644
index 0000000..9df5665
Binary files /dev/null and b/demo/Adminstor/Adminstor/DemoUi.aps differ
diff --git a/demo/Adminstor/Adminstor/Resource.h b/demo/Adminstor/Adminstor/Resource.h
index 5f0a4d8..9f75d0a 100644
--- a/demo/Adminstor/Adminstor/Resource.h
+++ b/demo/Adminstor/Adminstor/Resource.h
@@ -1,14 +1,2 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by DemoUi.rc
-
-// ¶һĬֵ
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 101
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1001
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/demo/Adminstor/Adminstor/framework.h b/demo/Adminstor/Adminstor/framework.h
index 4b84f0f..5e85361 100644
--- a/demo/Adminstor/Adminstor/framework.h
+++ b/demo/Adminstor/Adminstor/framework.h
@@ -18,4 +18,4 @@
#include "EzUI/TileListView.h"//瓦片列表
#include "EzUI/LayeredWindow.h"//分层窗口类-可以异型透明窗口
#include "ezui/UIManager.h"//ui管理类(使用xml生成控件)
-
+#include "EzUI/Animation.h"
diff --git a/demo/Adminstor/Adminstor/loginForm.cpp b/demo/Adminstor/Adminstor/loginForm.cpp
index 2a24f9f..caadcc1 100644
--- a/demo/Adminstor/Adminstor/loginForm.cpp
+++ b/demo/Adminstor/Adminstor/loginForm.cpp
@@ -1,5 +1,6 @@
#include "pch.h"
#include "loginForm.h"
+#include "mainForm.h"
void loginForm::OnNotify(Control* sender, EventArgs& args)
{
@@ -8,22 +9,31 @@ void loginForm::OnNotify(Control* sender, EventArgs& args)
TextBox* editUser = (TextBox*)FindControl("user");
TextBox* editpwd = (TextBox*)FindControl("pwd");
CheckBox* ckbox = (CheckBox*)FindControl("ckbox");
- if (!ckbox->GetCheck()) {
+ /*if (!ckbox->GetCheck()) {
::MessageBoxW(Hwnd(), L"ĶЭ鲢ѡ!", L"ʾ", MB_OK);
return;
- }
+ }*/
UIString user = editUser->GetText();
UIString pwd = editpwd->GetText();
- if (user == "718987717" && pwd == "123456") {
- ::MessageBoxW(Hwnd(), L"¼ɹ!", L"ʾ", MB_OK);
- }
- else {
- ::MessageBoxW(Hwnd(), L"û!", L"ʾ", MB_OK);
- }
+
+ Hide(); // ص¼
+ static mainForm mainForm;
+ mainForm.Show(); // ʾ
+
+ //if (user == "ad" && pwd == "123") {
+ // ::MessageBoxW(Hwnd(), L"¼ɹ!", L"ʾ", MB_OK);
+ // Hide(); // ص¼
+ // static mainForm mainForm;
+ // mainForm.Show(); // ʾ
+ //}
+ //else {
+ // ::MessageBoxW(Hwnd(), L"û!", L"ʾ", MB_OK);
+ //}
}
if (sender->Name == "btnExit") {
Application::Exit();
}
+ //
if (!sender->GetAttribute("url").empty()) {
::ShellExecuteA(0, "open", sender->GetAttribute("url").c_str(), "", "", SW_SHOW);
}
diff --git a/demo/Adminstor/Adminstor/mainForm.cpp b/demo/Adminstor/Adminstor/mainForm.cpp
new file mode 100644
index 0000000..bb43d5e
--- /dev/null
+++ b/demo/Adminstor/Adminstor/mainForm.cpp
@@ -0,0 +1,60 @@
+#include "pch.h"
+#include "mainForm.h"
+
+void mainForm::OnNotify(Control* sender, EventArgs& args)
+{
+ UIString btnName = sender->Name; // ؼid
+ Event eventType = args.EventType; // ¼
+
+ switch (eventType)
+ {
+ case ezui::OnMouseDown: //갴
+ {
+ if (btnName == "btnExitMain") { //˳
+ int result = ::MessageBoxW(Hwnd(), L"Ҫ˳", L"ʾ", MB_YESNO | MB_ICONQUESTION);
+ if (result == IDYES)
+ exit(0);
+ }
+ else if (btnName == "btnMinMain") { //С
+ this->ShowMinimized();
+ }
+ }
+ break;
+ case ezui::OnMouseDoubleClick: //˫
+ {
+ //if (btnName == "titleMain") { //Ⲽ
+ // if (this->IsMaximized()) {
+ // this->ShowNormal();
+ // }
+ // else {
+ // this->ShowMaximized();
+ // }
+ //}
+ }
+ break;
+ default:
+ break;
+ }
+ if (args.EventType == Event::OnMouseDown) {
+
+
+ }
+ __super::OnNotify(sender, args);
+}
+
+void mainForm::OnClose(bool& close)
+{
+ Application::Exit();
+}
+
+mainForm::mainForm() :LayeredWindow(1000, 750)
+{
+ SetResizable(true); // ôڴС
+ SetMiniSize(Size(600, 450)); // Сߴ
+ umg.LoadXml("res/mainForm.htm");//xmlĿؼʽ
+ umg.SetupUI(this);
+}
+
+mainForm::~mainForm()
+{
+}
diff --git a/demo/Adminstor/Adminstor/mainForm.h b/demo/Adminstor/Adminstor/mainForm.h
new file mode 100644
index 0000000..f1eedab
--- /dev/null
+++ b/demo/Adminstor/Adminstor/mainForm.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "pch.h"
+
+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:
+ mainForm();
+ virtual ~mainForm();
+};
+
diff --git a/demo/QQ/QQ.APS b/demo/QQ/QQ.APS
new file mode 100644
index 0000000..b82194d
Binary files /dev/null and b/demo/QQ/QQ.APS differ
diff --git a/demo/QQ/QQ.vcxproj b/demo/QQ/QQ.vcxproj
new file mode 100644
index 0000000..09f0bbc
--- /dev/null
+++ b/demo/QQ/QQ.vcxproj
@@ -0,0 +1,195 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 17.0
+ Win32Proj
+ {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}
+ QQ
+ 10.0
+
+
+
+ Application
+ true
+ v143
+ Unicode
+
+
+ Application
+ false
+ v143
+ true
+ Unicode
+
+
+ Application
+ true
+ v143
+ Unicode
+
+
+ Application
+ false
+ v143
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ..\_bin\
+ ..\_temp\$(Platform)$(Configuration)\$(ProjectName)\
+ ..\..\include;$(IncludePath)
+ ..\..\lib;$(LibraryPath)
+ $(ProjectName)_$(Configuration)_$(Platform)
+
+
+ ..\_bin\
+ ..\_temp\$(Platform)$(Configuration)\$(ProjectName)\
+ ..\..\include;$(IncludePath)
+ ..\..\lib;$(LibraryPath)
+ $(ProjectName)_$(Configuration)_$(Platform)
+
+
+ ..\_bin\
+ ..\_temp\$(Platform)$(Configuration)\$(ProjectName)\
+ ..\..\include;$(IncludePath)
+ ..\..\lib;$(LibraryPath)
+ $(ProjectName)_$(Configuration)_$(Platform)
+
+
+ ..\_bin\
+ ..\_temp\$(Platform)$(Configuration)\$(ProjectName)\
+ ..\..\include;$(IncludePath)
+ ..\..\lib;$(LibraryPath)
+ $(ProjectName)_$(Configuration)_$(Platform)
+
+
+
+ Level3
+ true
+ EZUI_STATIC;%(PreprocessorDefinitions)
+ true
+ stdcpp17
+ MultiThreadedDebug
+
+
+ Windows
+ true
+ EzUI_$(Configuration)_$(Platform).lib;%(AdditionalDependencies)
+
+
+ ..\..\include;%(AdditionalIncludeDirectories)
+
+
+
+
+ Level3
+ true
+ true
+ true
+ EZUI_STATIC;%(PreprocessorDefinitions)
+ true
+ stdcpp17
+ MultiThreaded
+
+
+ Windows
+ false
+ EzUI_$(Configuration)_$(Platform).lib;%(AdditionalDependencies)
+
+
+ ..\..\include;%(AdditionalIncludeDirectories)
+
+
+
+
+ Level3
+ true
+ EZUI_STATIC;%(PreprocessorDefinitions)
+ true
+ stdcpp17
+ MultiThreadedDebug
+
+
+ Windows
+ true
+ EzUI_$(Configuration)_$(Platform).lib;%(AdditionalDependencies)
+
+
+ ..\..\include;%(AdditionalIncludeDirectories)
+
+
+
+
+ Level3
+ true
+ true
+ true
+ EZUI_STATIC;%(PreprocessorDefinitions)
+ true
+ stdcpp17
+ MultiThreaded
+
+
+ Windows
+ false
+ EzUI_$(Configuration)_$(Platform).lib;%(AdditionalDependencies)
+
+
+ ..\..\include;%(AdditionalIncludeDirectories)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/QQ/QQ.vcxproj.filters b/demo/QQ/QQ.vcxproj.filters
new file mode 100644
index 0000000..3234a84
--- /dev/null
+++ b/demo/QQ/QQ.vcxproj.filters
@@ -0,0 +1,46 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ 源文件
+
+
+ 源文件
+
+
+ 源文件
+
+
+
+
+ 头文件
+
+
+ 头文件
+
+
+
+
+ 资源文件
+
+
+
+
+ 资源文件
+
+
+
diff --git a/demo/QQ/QQ.vcxproj.user b/demo/QQ/QQ.vcxproj.user
new file mode 100644
index 0000000..88a5509
--- /dev/null
+++ b/demo/QQ/QQ.vcxproj.user
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/demo/QQ/loginForm.cpp b/demo/QQ/loginForm.cpp
index 5f4ac74..7d10a4f 100644
--- a/demo/QQ/loginForm.cpp
+++ b/demo/QQ/loginForm.cpp
@@ -1,4 +1,5 @@
-#include "loginForm.h"
+#include "loginForm.h"
+#include "mainForm.h"
LoginForm::LoginForm() :LayeredWindow(320, 448)
{
@@ -19,7 +20,10 @@ void LoginForm::OnNotify(Control* sender, EventArgs& args)
UIString user = editUser->GetText();
UIString pwd = editpwd->GetText();
if (user == "718987717" && pwd == "123456") {
- ::MessageBox(Hwnd(), L"登录成功!", L"提示", MB_OK);
+ // 登录成功,跳转到主界面
+ Hide(); // 隐藏登录窗口
+ static MainForm mainForm;
+ mainForm.Show(); // 显示主界面
}
else {
::MessageBox(Hwnd(), L"用户名或密码错误!", L"提示", MB_OK);
diff --git a/demo/QQ/loginForm.h b/demo/QQ/loginForm.h
index c7ca846..76ce54f 100644
--- a/demo/QQ/loginForm.h
+++ b/demo/QQ/loginForm.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include "ezui/Application.h" //app类
#include "EzUI/Window.h" //基础窗口类
#include "EzUI/Button.h" //按钮
@@ -14,7 +14,6 @@
#include "EzUI/LayeredWindow.h"//分层窗口类-可以异型透明窗口
#include "ezui/UIManager.h"//ui管理类(使用xml生成控件)
-#pragma comment(lib,"ezui.lib")
using namespace ezui;
using Form = LayeredWindow; //支持异形透明窗口(带阴影)
diff --git a/demo/QQ/main.cpp b/demo/QQ/main.cpp
index 3b69ac5..52410ae 100644
--- a/demo/QQ/main.cpp
+++ b/demo/QQ/main.cpp
@@ -9,7 +9,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
Application app(hInstance);
app.EnableHighDpi();//启用高DPI
app.SetResource("my_res");//设定资源名称
-
+
//创建登录创建
LoginForm loginFrm;
loginFrm.Show();
diff --git a/demo/QQ/mainForm.cpp b/demo/QQ/mainForm.cpp
new file mode 100644
index 0000000..8776a0d
--- /dev/null
+++ b/demo/QQ/mainForm.cpp
@@ -0,0 +1,38 @@
+#include "mainForm.h"
+
+void MainForm::OnNotify(Control* sender, EventArgs& args)
+{
+ if (args.EventType == Event::OnMouseDown) {
+ if (sender->Name == "btnMin") {
+ SendMessage(Hwnd(), WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ }
+ else if (sender->Name == "btnMax") {
+ if (IsZoomed(Hwnd())) {
+ SendMessage(Hwnd(), WM_SYSCOMMAND, SC_RESTORE, 0);
+ }
+ else {
+ SendMessage(Hwnd(), WM_SYSCOMMAND, SC_MAXIMIZE, 0);
+ }
+ }
+ else if (sender->Name == "btnClose") {
+ Close();
+ }
+ }
+ __super::OnNotify(sender, args);
+}
+
+void MainForm::OnClose(bool& close)
+{
+ Application::Exit();
+}
+
+MainForm::MainForm() : LayeredWindow(800, 600)
+{
+ SetText(L"QQ主界面");
+ umg.LoadXml("res/mainForm.htm");
+ umg.SetupUI(this);
+}
+
+MainForm::~MainForm()
+{
+}
diff --git a/demo/QQ/mainForm.h b/demo/QQ/mainForm.h
new file mode 100644
index 0000000..c9195dc
--- /dev/null
+++ b/demo/QQ/mainForm.h
@@ -0,0 +1,35 @@
+#pragma once
+#include "ezui/Application.h" //app类
+#include "EzUI/Window.h" //基础窗口类
+#include "EzUI/Button.h" //按钮
+#include "EzUI/TextBox.h" //文本框
+#include "EzUI/CheckBox.h" //复选框
+#include "EzUI/PictureBox.h" //图片控件
+#include "EzUI/TabLayout.h" //选项卡控件
+#include "EzUI/VLayout.h" //垂直布局
+#include "EzUI/HLayout.h"//水平布局
+#include "EzUI/VListView.h"//垂直带滚动条列表
+#include "EzUI/HListView.h"//水平带滚动条列表
+#include "EzUI/TileListView.h"//瓦片列表
+#include "EzUI/LayeredWindow.h"//分层窗口类-可以异型透明窗口
+#include "ezui/UIManager.h"//ui管理类(使用xml生成控件)
+#include "EzUI/LayeredWindow.h"
+#include "EzUI/Label.h"
+#include "EzUI/VLayout.h"
+#include "EzUI/HLayout.h"
+#include "EzUI/UIManager.h"
+
+using namespace ezui;
+
+// 主界面
+class MainForm : public LayeredWindow
+{
+private:
+ UIManager umg;
+protected:
+ virtual void OnNotify(Control* sender, EventArgs& args) override;
+ virtual void OnClose(bool& close) override;
+public:
+ MainForm();
+ virtual ~MainForm();
+};
diff --git a/demo/QQ/res/head.png b/demo/QQ/res/head.png
index 958c983..f93a621 100644
Binary files a/demo/QQ/res/head.png and b/demo/QQ/res/head.png differ
diff --git a/demo/QQ/res/mainForm.htm b/demo/QQ/res/mainForm.htm
new file mode 100644
index 0000000..64ca884
--- /dev/null
+++ b/demo/QQ/res/mainForm.htm
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file