关闭模态窗口 [英] Close Modal window

查看:137
本文介绍了关闭模态窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



谁能告诉我如何关闭模式窗口?
我正在使用domodal(),但是该窗口没有任何按钮或控件.
根据某些条件,我想关闭该窗口.

解决方案

当您打开模态窗口时,代码将在调用点domodal()时等待.您可以在调用domodal()之前检查它,或者让窗口在加载事件中自行处理它.

祝你好运!



可以使用EndDialog()函数或通过使用WM_CLOSE参数调用SendMessage()来关闭模式对话框.如果要在显示对话框一段时间后关闭对话框,而无需单击任何控件,则可以使用计时器"用于此.

问候,
Devadutta


这是一个转贴( 解决方案

When you open the modal window the code will wait at the point domodal() is called. You can check it before calling domodal() or have the window handle it by itself in the load event.

Good luck!


Hi,
The modal dialog can be closed using the EndDialog() function or by calling the SendMessage() with WM_CLOSE parameter.And if you want to close the dialog after displaying it for some time with out clicking any control as such, then "timer" can be used for that.

Regards,
Devadutta


This is a repost (Modal window should get closed without any input from user[^]).
I gave you an answer on your original post, and I added some details on your fake answer (I''ve seen it only a few minutes ago).


这篇关于关闭模态窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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