关闭前做一些步骤 [英] Do some steps before closing

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

问题描述

大家好,

我总是从这个网站得到很好的帮助。



这次我需要在关闭标签窗口之前检查。



窗口类继承自CWnd类



因此,当用户请求窗口关闭时,我需要检查是否有任何线程正在运行,如果运行我想要提示用户。如果用户想要我想以适当的方式关闭窗口而没有。



我没有方式问题。但我没有找到如何取消窗口越来越近。 OnClose和OnDestroy都返回void。如何处理这个问题?

Hello everyone,
I always get good help from this site.

This time i am in a situation where I need to check before I close the tabbed window.

the window class is inherited from CWnd class

So, when user request for window close, I need to check if any thread is running or not, if running i want to prompt the user. if user want i want to close the window in proper manner without.

I am not having the manner problem. But I am failing to find out how to cancel the window getting close. both of OnClose and OnDestroy return void. how to handle this thing?

推荐答案

您的 CCDRProcessView 可能根本没有收到onClose消息。您的选项卡式视图窗口是从CMDIChildWndEx创建的(如果我们使用相同的...........)。可能您的CMDIChildWndEx窗口正在接收您的onClose命令。我检查了我的机器。
Your CCDRProcessView might not receiving onClose message at all. your tabbed view window is created from the CMDIChildWndEx(if we are using the same...........). And probably your CMDIChildWndEx window is receiving your onClose command. I checked on my machine.


这里: http://msdn.microsoft.com/en-us/library/hh46df93%28v=vs.80%29.aspx [ ^ ]。



处理 nID == SC_CLOSE 的回调。



-SA
Here: http://msdn.microsoft.com/en-us/library/hh46df93%28v=vs.80%29.aspx[^].

Handle this callback for nID == SC_CLOSE.

—SA


这篇关于关闭前做一些步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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