ccbuluo / duilib

Automatically exported from code.google.com/p/duilib
0 stars 0 forks source link

主窗口创建子窗口 子窗口关闭的问题 ShowModal相关 #92

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

无意测试的时候  主窗口创建一个窗口
CAbout public WindowImplBase;

 CAbout AboutForm;
AboutForm.Create(m_hWnd, _T("TAboutForm"),UI_WNDSTYLE_DIALOG, 0, 0, 0, 0, 0, 
NULL);
 AboutForm.CenterWindow();
AboutForm.ShowModal();
关闭About的时候会非常的慢
改成   CAbout* AboutForm = new CAbout();
::ShowWindow(*AboutForm, SW_SHOW);
快了一点 还是慢 后来 在CAbout中的onclose里面 增加
DestroyWindow(m_hWnd); 就快了
////////////////////////////////
一般用户只能接受 0秒关闭
华为dbank 的子窗口就是这样 关闭慢吞吞的 用的想吐 
一般应用开发者 只要 创建ShowModal()就够了 够简单够快速
献给duilib的一个小问题 虽从未用过 

Original issue reported on code.google.com by marktam...@gmail.com on 12 Nov 2013 at 9:37