控件是不可见的 [英] controls are invisible

查看:79
本文介绍了控件是不可见的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在主要父对话框的一个选项卡控件中添加多个窗口时,它已成功添加但是每当我运行该程序时,它运行应用程序但在按下转义按钮后它会丢失子窗口中的所有控件,我为它做了什么?

When I added multiple windows in one tab control of main parent dialogue,it added successfully but whenever I''m run the program that time it runs an application but after pressing the escape button it loses all the controls in child windows, what I do for it?

推荐答案

在子对话框(您在选项卡控件中插入的对话框)中,您需要覆盖MFC CDialog的OnCancel方法(或CDialogEx)

并且不执行任何操作,甚至不调用基本方法:

In the child dialogs (the ones you insert in the tab control) you need to override the OnCancel method of the MFC CDialog (or CDialogEx)
And do nothing in it, not even calling the base method:
void CMySubDialog::OnCancel()
{
// CDialogEx::OnCancel();
}


这篇关于控件是不可见的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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