文件名称:dialog_ex1
- 所属分类:
- 软件工程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2015-07-09
- 文件大小:
- 1.78mb
- 下载次数:
- 0次
- 提 供 者:
- 陈**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
要在VC程序中打开一个新的对话框,步骤是:
(1) 创建新对话框类。在“资源标签”下,创建一个新的对话框NewDialog,再右击该对话框,选择“ClassWizard”,创建一个“新类new Class”,记得该对话框的基类是CDialog;
此时,在ClassView标签下已经有了新建对话框类,但是该类与程序的主对话框还没有任何关系。
(2)关联新对话框类。在FileView标签下,打开程序主对话框的Dlg头文件,如dialog_ex1Dlg.h,在这个头文件的前面引入新建对话框类的头文件,即写#include NewDialog.h 语句;再在主对话框的public标记下,定义一个新对话框类变量,即写语句NewDialog m_dlg;
此时,可以打开dailog_ex1Dlg.cpp文件,再编译连接,检查关联操作是否正确,正确则没有任何错误。
(3)添加打开模式框操作代码。本样例中,当单击主对话框的“打开新对话框”按钮,则弹出新对话框。所以要在“打开新对话框”按钮的方法中,屏蔽原有语句CDialog::OnOK() ,再添加新语句 m_dlg.DoModal () 完成新对话框的打开。-To open a new dialog in VC program, the steps are:
(1) Create a new dialog class. In the resource label to create a new dialog NewDialog, then right-click the dialog box, ClassWizard , creating a new class of new Class , remember that dialog is the base class CDialog
At this time, in the New dialog box ClassView tags have class, but the class and the main dialog does not have any relationship.
(2) associated with the new dialog class. In FileView tab, open the main program dialog Dlg header files, such as dialog_ex1Dlg.h, in front of the introduction of the new header file dialog class header file by writing#include NewDialog.h statement and then in the main dialog box of public tag, define a new dialog class variables, namely write statements NewDialog m_dlg
At this point, you can open dailog_ex1Dlg.cpp file, then compile the connection, check the related operation is correct, there is no correct any errors.
(1) 创建新对话框类。在“资源标签”下,创建一个新的对话框NewDialog,再右击该对话框,选择“ClassWizard”,创建一个“新类new Class”,记得该对话框的基类是CDialog;
此时,在ClassView标签下已经有了新建对话框类,但是该类与程序的主对话框还没有任何关系。
(2)关联新对话框类。在FileView标签下,打开程序主对话框的Dlg头文件,如dialog_ex1Dlg.h,在这个头文件的前面引入新建对话框类的头文件,即写#include NewDialog.h 语句;再在主对话框的public标记下,定义一个新对话框类变量,即写语句NewDialog m_dlg;
此时,可以打开dailog_ex1Dlg.cpp文件,再编译连接,检查关联操作是否正确,正确则没有任何错误。
(3)添加打开模式框操作代码。本样例中,当单击主对话框的“打开新对话框”按钮,则弹出新对话框。所以要在“打开新对话框”按钮的方法中,屏蔽原有语句CDialog::OnOK() ,再添加新语句 m_dlg.DoModal () 完成新对话框的打开。-To open a new dialog in VC program, the steps are:
(1) Create a new dialog class. In the resource label to create a new dialog NewDialog, then right-click the dialog box, ClassWizard , creating a new class of new Class , remember that dialog is the base class CDialog
At this time, in the New dialog box ClassView tags have class, but the class and the main dialog does not have any relationship.
(2) associated with the new dialog class. In FileView tab, open the main program dialog Dlg header files, such as dialog_ex1Dlg.h, in front of the introduction of the new header file dialog class header file by writing#include NewDialog.h statement and then in the main dialog box of public tag, define a new dialog class variables, namely write statements NewDialog m_dlg
At this point, you can open dailog_ex1Dlg.cpp file, then compile the connection, check the related operation is correct, there is no correct any errors.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
dialog_ex1\Debug\dialog_ex1.exe
..........\.....\dialog_ex1.ilk
..........\.....\dialog_ex1.obj
..........\.....\dialog_ex1.pch
..........\.....\dialog_ex1.pdb
..........\.....\dialog_ex1.res
..........\.....\dialog_ex1Dlg.obj
..........\.....\NewDialog.obj
..........\.....\StdAfx.obj
..........\.....\vc60.idb
..........\.....\vc60.pdb
..........\dialog_ex1.aps
..........\dialog_ex1.clw
..........\dialog_ex1.cpp
..........\dialog_ex1.dsp
..........\dialog_ex1.dsw
..........\dialog_ex1.h
..........\dialog_ex1.ncb
..........\dialog_ex1.opt
..........\dialog_ex1.plg
..........\dialog_ex1.rc
..........\dialog_ex1Dlg.cpp
..........\dialog_ex1Dlg.h
..........\NewDialog.cpp
..........\NewDialog.h
..........\ReadMe.txt
..........\res\dialog_ex1.ico
..........\...\dialog_ex1.rc2
..........\resource.h
..........\StdAfx.cpp
..........\StdAfx.h
..........\Debug
..........\res
dialog_ex1