销毁mfc mdi程序和标签 [英] Destroying mfc mdi program and tabs

查看:99
本文介绍了销毁mfc mdi程序和标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨所有

我有一个MFC MDI c ++程序,

我想知道是否可以决定关闭其中一个标签(确保关闭MsgBox) ?类似于对话基础程序中的oncancel函数。



还有一个事件可以在关闭其中一个标签时关闭整个程序吗?



谢谢为你的导游



我尝试过:



我试过ondestroy第一种情况的功能但是没有成功

解决方案

你可以使用 WM_CLOSE 消息。使用PostMessage API并执行所有需要的操作,例如之前保存数据和设置。



您还可以使用 PostQuitMessage

hi all
I have a MFC MDI c++ program,
And I want to know is it possible to decide about close one of tabs (sure to close MsgBox) ? something similar to oncancel function in dialogue base program.

and also is there a event to close the entire program on closing one of tabs?

thanks for your guides

What I have tried:

I tried ondestroy function for first case but it was not successful

解决方案

You can use the WM_CLOSE message. Use the PostMessage API for it and do all needed operations like saving data and settings before.

You can also use PostQuitMessage.


这篇关于销毁mfc mdi程序和标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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