Comments (7)
@01haike 烦请使用标准 markdown 语法来描述多行代码 https://www.runoob.com/markdown/md-code.html,这样代码更加清晰。问题现象中描述出现该问题的直接现象,应该表现为何种状态,现在又是何种状态。如有必要请在重现步骤中描述清楚重现该问题的方法或示例代码。
from nim_duilib_framework.
@nmgwddj 抱歉,之前我用过 ``` 包含代码时没有效果。然后一直也没去解决怎么包含代码。现在会了,谢谢。
from nim_duilib_framework.
你的窗口需要从 WindowEx 类派生实现 GetWindowId
方法。这样你的窗口就会被注册到窗口管理类中。
from nim_duilib_framework.
你的窗口需要从 WindowEx 类派生实现
GetWindowId
方法。这样你的窗口就会被注册到窗口管理类中。
我有一个窗口,但是需要显示两次。
from nim_duilib_framework.
你的窗口需要从 WindowEx 类派生实现
GetWindowId
方法。这样你的窗口就会被注册到窗口管理类中。我有一个窗口,但是需要显示两次。
可以从 WindowImplBase
派生。自己实现隐藏显示逻辑。
from nim_duilib_framework.
你的窗口需要从 WindowEx 类派生实现
GetWindowId
方法。这样你的窗口就会被注册到窗口管理类中。我有一个窗口,但是需要显示两次。
可以从
WindowImplBase
派生。自己实现隐藏显示逻辑。
template<typename WindowType, typename... TInstanceParams>
static WindowType* SingletonShow(const std::wstring& window_id, const TInstanceParams&... params)
{
WindowType *window = (WindowType*)(WindowsManager::GetInstance()->GetWindow(WindowType::kClassName, window_id));
if (!window)
{
window = new WindowType(params...);
window->Create(NULL, WindowType::kClassName, WS_OVERLAPPEDWINDOW & ~WS_MAXIMIZEBOX, 0);
window->CenterWindow();
window->ShowWindow();
}
else
{
window->ActiveWindow();
}
return window;
}
那这个函数中的 window_id 参数就没有效果了啊,没有实际用途。
from nim_duilib_framework.
@01haike 代码稍加改造就可以实现您的需求,在 SingletonShow 时增加一些参数决定窗口是否可以重复创建,这个修改应该不是很难吧?
WindowEx 是一个辅助工具类,目的是更好的管理自己的窗口,没有把它放到 Duilib 核心代码中也是给大家提供一种管理窗口的方案,这已经偏向于业务场景了,不同的业务一份代码一定是无法完全兼容的,所以才把这个模块抽离出来,您可以根据自己业务随意修改。
from nim_duilib_framework.
Related Issues (20)
- 如何在richedit中添加图片等?
- mini_blink加载的页面不响应鼠标点击
- TabBox::Remove问题
- GetDpiImageFullPath函数有泄漏 HOT 2
- 能否支持运行期间响应DPI变化
- master分支能否支持克隆下来能直接使用vs2022编译通过的 HOT 4
- 想用该框架来做音视频通话,请问是否合适?可以给一些思路和建议吗?感谢 HOT 2
- OptionBox设置selected属性后无效 而且程序运行崩溃
- 自定义控件绘制本地摄像头数据没有颜色 HOT 1
- duiLib有什么交流群吗?这个项目目前还在维护吗?
- 缺少cefwrapper的lib库
- ui::GlobalManager::CreateBoxWithCache返回null;
- 插件模块的开发
- shadowattached=“false“ 导致 RichEdit 透明穿透 到底怎么修复啊!还是不会! HOT 1
- develop版 怎么修改编码都编译不通过
- 把一个session_box单独出来放在session_form中后,任务栏缩略图空白 HOT 1
- bool ScrollableBox::IsAtEnd() 在特定情况下返回值不准的问题 HOT 1
- ui框架中图标有毛边 HOT 1
- 在触摸屏下,点击cef中页面的输入框,无法弹出系统虚拟键盘(软键盘)的问题 HOT 1
- cef控件,监听事件无返回 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 nim_duilib_framework.