如何隐藏/关闭模式对话框? [英] How to hide/close the modal dialog box?

查看:661
本文介绍了如何隐藏/关闭模式对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使程序自动运行而不显示用户界面.

我试图在CDialog类中使用enddialog()和destroywindow()函数.但是我发现任何一种方法都会终止程序.我希望只是隐藏或关闭对话框,但程序可以继续(发送或接收数据).有人知道如何实现这一目标吗?

I m trying to make the program automatically run without showing the user interface.

I m trying to use enddialog()and destroywindow() function in CDialog Class. But I find either way will terminate the program. What I expect is to just hide or close the dialog box but the program can continue (sending or receiving data). Anyone knows how to achieve this?

Thanks ahead.

推荐答案

从窗口或对话框中删除WS_VISIBLE样式.

但是... ...做一些事情让用户再次看到它,否则将无法关闭您的应用程序.
Remove the WS_VISIBLE style from the window or dialog.

But ... do something to allow the user to make it visible again, otherwise it will be impossible to close your app.


这篇关于如何隐藏/关闭模式对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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