DoModal()阻止其父级父窗口 [英] DoModal() blocking its grand parent window

查看:81
本文介绍了DoModal()阻止其父级父窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题在VC 6中也不会发生

我的主应用程序窗口是Wnd1,它已经启动了formview(无模式对话框)dlg1,而dlg1正在启动dlg2模态对话框.因此,它必须阻止dlg1阻止其他用户操作.但是为什么要使用Wnd1 ?.
一旦启动dlg1,我就可以在Wnd1上执行任何操作.因此,为什么启动dlg2会阻止Wnd1

Also this issue is not happening in VC 6

I have Main application window is Wnd1 and it has launched a formview (Modeless dialog) dlg1 and dlg1 is launching dlg2 a modal dialog. So it has to block dlg1 from other user action. but why Wnd1?.
Once I have lauched dlg1 i will be able to do anything on Wnd1 right. So why launching of dlg2 should block Wnd1

推荐答案

这就是我希望domodal做的事情,所以我希望Microsoft将其视为错误修复程序,不是错误.
That''s what I''d expect domodal to do, I expect that Microsoft regards this as a bug fix, not a bug.


像CG一样,我一直理解 modal 是指阻止同一应用程序的所有其他窗口.解决该问题的一种方法是让Wnd1作为单独的进程启动dlg1,但这可能不是您想要的.您可以通过各种控制面板"小程序看到这两种行为.

[为澄清而进行编辑]我认为formview不是一个单独的过程.一种检查方法是使用任务管理器(从Ctrl-Alt-Del菜单中)来查看启动事物时正在运行的进程.如果打开formview时没有弹出新的过程,那么上面的解释就成立了.我不知道VC6做了什么,但是您可以尝试相同的实验. [/edit]
Like CG, I always understood modal to mean blocking all other windows for the same application. One way around it is for your Wnd1 to launch dlg1 as a separate process, but that is probably not what you want to do. You can see both kinds of behaviour with various Control Panel applets.

[edit in response to clarification] I think that the formview is NOT a separate process. One way to check is to use Task Manager (from Ctrl-Alt-Del menu) to look at processes running as you launch things. If no new process pops up when you open the formview, then my explanation above stands. I''ve got no idea what VC6 did/does, but you might be able to try the same experiment. [/edit]


这篇关于DoModal()阻止其父级父窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆