
上QQ阅读APP看书,第一时间看更新
3.2 建立一个简单的对话框程序
创建对话框程序非常简单,不需要编写一行代码,只需跟着Visual C++ 2013的工程向导做即可。
【例3.1】 建立一个简单的对话框程序
(1)打开Visual C++ 2013,选择菜单“新建”|“项目”,然后在“新建项目”对话框上,输入项目名称和项目路径,如图3-1所示。

图3-1
输入完毕后,单击“确定”按钮,出现“欢迎使用MFC应用程序向导”对话框,如图3-2所示。

图3-2
(2)在“欢迎使用MFC应用程序向导”对话框上,单击“下一步”,出现“应用程序类型”对话框,如图3-3所示。

图3-3
(3)在“应用程序类型”对话框上,选中“基于对话框”,然后单击“完成”。至此对话框程序新建完成,我们开始编译运行它。
(4)在Visual C++ 2013中单击菜单“调试”|“开始执行(不调试)”,稍等会,一个对话框程序出现了,如图3-4所示。

图3-4