文件名称:feimotaiduihuak
-
所属分类:
- 标签属性:
- 上传时间:2013-05-11
-
文件大小:46.05kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
非模态对话框的创建比较复杂。下面介绍具体的方法:
首先,创建一个新的对话框资源,并新建一个类与之关联(用AppWizard);
其次,调用CDialog的默认构造函数来构造对话框对象(注意,创建的不是窗口),这一步在主框架窗口的构造函数中实现。
再次,调用CDialog::Create成员函数创建窗口,Create把资源ID作为参数,并且,在对话框窗口仍然在屏幕上显示时,就立刻返回控件。
最后,在关闭非模态对话框时,注意要调用DestroyWindow函数而不是CloseWindow。删除的只是对话框窗口,对话框对象并未删除,留待创建新的窗口。在程序退出时,再删除该对话框对象。这个过程中对话框与主窗口之间消息的传递必须由用户实现,自定义消息映射(在代码的第10步详细说明)。
在编程过程中必须准确了解何时构造对话框对象,何时创建对话框窗口,何时删除对话框。
-Non-modal dialog box to create more complicated. The following describes the specific methods:
First, create a new dialog resources, and create a new class associated with it (with AppWizard)
Second, call the CDialog the default constructor to construct the dialog object (note that not create the window), this step in the constructor of the main frame window.
Again, call CDialog :: Create member function to create a window, Create the resource ID as a parameter in the dialog window is still displayed on the screen, immediately return the control.
Finally, a non-modal dialog box is closed, pay attention to call the the DestroyWindow function instead of CloseWindow. Delete only the window of the dialog box, the dialog object is not deleted, left to create a new window. When the program exits, and then delete the dialog object. This process dialog box with the message transfer between the main window must be implemented by the user, the custom message map (Step 10 in the code for det
首先,创建一个新的对话框资源,并新建一个类与之关联(用AppWizard);
其次,调用CDialog的默认构造函数来构造对话框对象(注意,创建的不是窗口),这一步在主框架窗口的构造函数中实现。
再次,调用CDialog::Create成员函数创建窗口,Create把资源ID作为参数,并且,在对话框窗口仍然在屏幕上显示时,就立刻返回控件。
最后,在关闭非模态对话框时,注意要调用DestroyWindow函数而不是CloseWindow。删除的只是对话框窗口,对话框对象并未删除,留待创建新的窗口。在程序退出时,再删除该对话框对象。这个过程中对话框与主窗口之间消息的传递必须由用户实现,自定义消息映射(在代码的第10步详细说明)。
在编程过程中必须准确了解何时构造对话框对象,何时创建对话框窗口,何时删除对话框。
-Non-modal dialog box to create more complicated. The following describes the specific methods:
First, create a new dialog resources, and create a new class associated with it (with AppWizard)
Second, call the CDialog the default constructor to construct the dialog object (note that not create the window), this step in the constructor of the main frame window.
Again, call CDialog :: Create member function to create a window, Create the resource ID as a parameter in the dialog window is still displayed on the screen, immediately return the control.
Finally, a non-modal dialog box is closed, pay attention to call the the DestroyWindow function instead of CloseWindow. Delete only the window of the dialog box, the dialog object is not deleted, left to create a new window. When the program exits, and then delete the dialog object. This process dialog box with the message transfer between the main window must be implemented by the user, the custom message map (Step 10 in the code for det
(系统自动生成,下载前可以参看下载内容)
下载文件列表
源代码/MainFrm.cpp
源代码/MainFrm.h
源代码/ModelessDialog.cpp
源代码/ModelessDialog.h
源代码/ReadMe.txt
源代码/Resource.h
源代码/ShowModelessDialog.aps
源代码/ShowModelessDialog.clw
源代码/ShowModelessDialog.cpp
源代码/ShowModelessDialog.dsp
源代码/ShowModelessDialog.dsw
源代码/ShowModelessDialog.h
源代码/ShowModelessDialog.ncb
源代码/ShowModelessDialog.opt
源代码/ShowModelessDialog.plg
源代码/ShowModelessDialog.rc
源代码/ShowModelessDialogDoc.cpp
源代码/ShowModelessDialogDoc.h
源代码/ShowModelessDialogView.cpp
源代码/ShowModelessDialogView.h
源代码/StdAfx.cpp
源代码/StdAfx.h
源代码/res/ShowModelessDialog.ico
源代码/res/ShowModelessDialog.rc2
源代码/res/ShowModelessDialogDoc.ico
源代码/res/Toolbar.bmp
源代码/res
源代码
源代码/MainFrm.h
源代码/ModelessDialog.cpp
源代码/ModelessDialog.h
源代码/ReadMe.txt
源代码/Resource.h
源代码/ShowModelessDialog.aps
源代码/ShowModelessDialog.clw
源代码/ShowModelessDialog.cpp
源代码/ShowModelessDialog.dsp
源代码/ShowModelessDialog.dsw
源代码/ShowModelessDialog.h
源代码/ShowModelessDialog.ncb
源代码/ShowModelessDialog.opt
源代码/ShowModelessDialog.plg
源代码/ShowModelessDialog.rc
源代码/ShowModelessDialogDoc.cpp
源代码/ShowModelessDialogDoc.h
源代码/ShowModelessDialogView.cpp
源代码/ShowModelessDialogView.h
源代码/StdAfx.cpp
源代码/StdAfx.h
源代码/res/ShowModelessDialog.ico
源代码/res/ShowModelessDialog.rc2
源代码/res/ShowModelessDialogDoc.ico
源代码/res/Toolbar.bmp
源代码/res
源代码
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.