向VS 2010 C ++项目添加表单 [英] Adding a Form to a VS 2010 C++ Project

查看:108
本文介绍了向VS 2010 C ++项目添加表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个愚蠢的问题,但我一直在寻找答案,非常需要帮助.我有一个已经有1种形式的MFC代码.我添加了另一种形式,但是这些形式没有链接.有人可以帮我链接代码,以便根据值切换显示表单.

Hi, this may be a stupid question but I have been searching for answers and desperately need help. I have a MFC code which has 1 form already. I have added another form however the forms are not linked. Can someone help me link the codes so that depending on a value the forms will switch being displayed.

推荐答案

我假设您说的是对话框. > 它在MFC中的工作方式是您需要创建一个代表对话框的类.
您可以通过右键单击对话框并选择Add Class来实现.

在为对话框创建类之后,只需创建该类的对象并在该实例上调用DoModal.
I assume you mean dialogs when you says forms.
The way it works in MFC is that you need to create a class that represents a dialog.
You can do this by right clicking on the dialog and selecting Add Class.

After you have classes for the dialogs, you just need to create an object of the class and call DoModal on that instance.


这篇关于向VS 2010 C ++项目添加表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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