文件名称:dialog_ex1
-
所属分类:
- 标签属性:
- 上传时间: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/Debug/dialog_ex1.ilk
dialog_ex1/Debug/dialog_ex1.obj
dialog_ex1/Debug/dialog_ex1.pch
dialog_ex1/Debug/dialog_ex1.pdb
dialog_ex1/Debug/dialog_ex1.res
dialog_ex1/Debug/dialog_ex1Dlg.obj
dialog_ex1/Debug/NewDialog.obj
dialog_ex1/Debug/StdAfx.obj
dialog_ex1/Debug/vc60.idb
dialog_ex1/Debug/vc60.pdb
dialog_ex1/dialog_ex1.aps
dialog_ex1/dialog_ex1.clw
dialog_ex1/dialog_ex1.cpp
dialog_ex1/dialog_ex1.dsp
dialog_ex1/dialog_ex1.dsw
dialog_ex1/dialog_ex1.h
dialog_ex1/dialog_ex1.ncb
dialog_ex1/dialog_ex1.opt
dialog_ex1/dialog_ex1.plg
dialog_ex1/dialog_ex1.rc
dialog_ex1/dialog_ex1Dlg.cpp
dialog_ex1/dialog_ex1Dlg.h
dialog_ex1/NewDialog.cpp
dialog_ex1/NewDialog.h
dialog_ex1/ReadMe.txt
dialog_ex1/res/dialog_ex1.ico
dialog_ex1/res/dialog_ex1.rc2
dialog_ex1/resource.h
dialog_ex1/StdAfx.cpp
dialog_ex1/StdAfx.h
dialog_ex1/Debug
dialog_ex1/res
dialog_ex1
dialog_ex1/Debug/dialog_ex1.ilk
dialog_ex1/Debug/dialog_ex1.obj
dialog_ex1/Debug/dialog_ex1.pch
dialog_ex1/Debug/dialog_ex1.pdb
dialog_ex1/Debug/dialog_ex1.res
dialog_ex1/Debug/dialog_ex1Dlg.obj
dialog_ex1/Debug/NewDialog.obj
dialog_ex1/Debug/StdAfx.obj
dialog_ex1/Debug/vc60.idb
dialog_ex1/Debug/vc60.pdb
dialog_ex1/dialog_ex1.aps
dialog_ex1/dialog_ex1.clw
dialog_ex1/dialog_ex1.cpp
dialog_ex1/dialog_ex1.dsp
dialog_ex1/dialog_ex1.dsw
dialog_ex1/dialog_ex1.h
dialog_ex1/dialog_ex1.ncb
dialog_ex1/dialog_ex1.opt
dialog_ex1/dialog_ex1.plg
dialog_ex1/dialog_ex1.rc
dialog_ex1/dialog_ex1Dlg.cpp
dialog_ex1/dialog_ex1Dlg.h
dialog_ex1/NewDialog.cpp
dialog_ex1/NewDialog.h
dialog_ex1/ReadMe.txt
dialog_ex1/res/dialog_ex1.ico
dialog_ex1/res/dialog_ex1.rc2
dialog_ex1/resource.h
dialog_ex1/StdAfx.cpp
dialog_ex1/StdAfx.h
dialog_ex1/Debug
dialog_ex1/res
dialog_ex1
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.