ShowDialog与父项 - 为什么不点击父项激活对话框 [英] ShowDialog with a parent - why doesn't clicking on the parent activate the dialog

查看:83
本文介绍了ShowDialog与父项 - 为什么不点击父项激活对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C ++ Windows窗体应用程序中看到了非标准行为(与Word和Visual Studio 2013等工具相比)。  我们使用Application :: Run然后使用ShowDialog来显示各种模态对话框。  当其中一个模态对话框是
up时,我将另一个应用程序窗口部分放在模态对话框的前面,我可以点击模态对话框的一部分,然后按照我的预期将它带回前景。 / p>

但是,如果我改为点击主窗口的一部分(用Application :: Run显示),则模态对话框不会显示在前台。  这使得我的应用程序很难恢复,所以我可以继续处理它。  想法? 

解决方案

编辑:我应该对此进行测试。


I'm seeing non-standard behavior (as compared to tools like Word and Visual Studio 2013) in my C++ Windows Forms application.  We use Application::Run and then ShowDialog to show various modal dialogs.  When one of the modal dialogs is up and I place another application window partially in front of the modal dialog, I can click on part of the modal dialog and it brings it back into the foreground as I expect.

However, if I instead click on part of the main window (shown with Application::Run) the modal dialog isn't brought to the foreground.  This makes it hard to bring my application back so I can work on it.  Ideas? 

解决方案

Edit: I should have tested this.


这篇关于ShowDialog与父项 - 为什么不点击父项激活对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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