Comments (2)
现有的设计没提供手动创建和管理多窗口的方法,只提供了个无缝显示模式,也就是给根部件里的每个子部件单独创建窗口,你试试?
LCUIDisplay_SetMode(LCUI_DMODE_SEAMLESS);
这块功能的代码很久没更新了,我不确定是否还有效果。
3.0 版本对这块做了调整,可手动管理窗口,示例代码:
#include <LCUI/platform.h>
#include <LCUI/ui.h>
#include <LCUI/ui/server.h>
...
ui_widget_t *widget;
app_window_t *window;
lcui_init();
widget = ui_create_widget(NULL);
window = app_window_create("窗口", 0, 0, 800, 600);
// 连接部件和窗口
ui_server_connect(widget, window);
// 后续对部件的改动都会由 UIServer 同步到这个窗口
ui_widget_resize(320, 240);
ui_widget_move(400, 400);
ui_widget_set_title("新标题");
lcui_main();
...
// 在其它地方获取部件对应的窗口
window = ui_server_get_window(widget);
...
#include <Windows.h>
// 获取系统窗口句柄
HWND wnd = app_window_get_handle(window);
...
如果你对这块有其它想法和建议的的话可以提出来,我看看能不能在 3.0 版本里实现。
from lcui.
现有的设计没提供手动创建和管理多窗口的方法,只提供了个无缝显示模式,也就是给根部件里的每个子部件单独创建窗口,你试试?
LCUIDisplay_SetMode(LCUI_DMODE_SEAMLESS);这块功能的代码很久没更新了,我不确定是否还有效果。
3.0 版本对这块做了调整,可手动管理窗口,示例代码:
#include <LCUI/platform.h> #include <LCUI/ui.h> #include <LCUI/ui/server.h> ... ui_widget_t *widget; app_window_t *window; lcui_init(); widget = ui_create_widget(NULL); window = app_window_create("窗口", 0, 0, 800, 600); // 连接部件和窗口 ui_server_connect(widget, window); // 后续对部件的改动都会由 UIServer 同步到这个窗口 ui_widget_resize(320, 240); ui_widget_move(400, 400); ui_widget_set_title("新标题"); lcui_main(); ... // 在其它地方获取部件对应的窗口 window = ui_server_get_window(widget); ... #include <Windows.h> // 获取系统窗口句柄 HWND wnd = app_window_get_handle(window); ...如果你对这块有其它想法和建议的的话可以提出来,我看看能不能在 3.0 版本里实现。
2.2版本怎么多窗口呢,应用场景 Login窗口和Main窗口
from lcui.
Related Issues (20)
- English API Documentation HOT 3
- Connecting Frontend to Backend HOT 2
- Modal Window Still Clickable HOT 3
- Text input not working for keys, which are symbol on Shift hold (such as $ or £) HOT 2
- TextEdit 删除文字BUG
- GPU Backend HOT 2
- 主页上的例子直接编译好多都编译不过去,老哥不改改嘛? HOT 1
- 默认的例子最大化后再最小化,控件都没了。 HOT 1
- Keyboard Input Doesn't Work (Windows x64) HOT 6
- 请问支持C++吗 HOT 1
- C++ 相关问题 HOT 2
- File Dialog? HOT 1
- textedit相关问题 HOT 4
- 静态库错误 HOT 6
- 希望可以添加对android的支持 HOT 1
- Failed to build on MSYS2 MINGW64 HOT 1
- Please add cmake based build script HOT 1
- Make documentation page open source, for translation HOT 1
- 请问哪里能下载比v0.12.4更早版本的源代码? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lcui.