- 11
- 0
- 约6.69万字
- 约 40页
- 2016-11-27 发布于河南
- 举报
对话框编程1
对话框编程
在环境VC6.0完成
新建一个MFC单文档应用程序工程,取名MyDlg,然后插入一个新Dialog,对话框资源也有一个类CDialog.
CDialog
The CDialog class is the base class used for displaying dialog boxes on the screen. Dialog boxes are of two types: modal and modeless. A modal dialog box must be closed by the user before the application continues. A modeless dialog box allows the user to display the dialog box and return to another task without canceling or removing the dialog box.
A CDialog object is a combination of a dialog template and a CDialog-derived class. Use the dialog editor to create the dialog template and store it in a resource, then use ClassWizard to create a class derived from CDialog.
A dialog box, like any other window, receives messages from Windows. In a dialog box, you are particularly interested in handling notification messages from the dialog box’s controls since that is how the user interacts with your dialog box. ClassWizard browses through the potential messages generated by each control in your dialog box, and you can select which messages you wish to handle. ClassWizard then adds the appropriate message-map entries and message-handler member functions to the new class for you. You only need to write application-specific code in the handler member functions.
If you prefer, you can always write message-map entries and member functions yourself instead of using ClassWizard.
In all but the most trivial dialog box, you add member variables to your derived dialog class to store data entered in the dialog box’s controls by the user or to display data for the user. ClassWizard browses through those controls in your dialog box that can be mapped to data and prompts you to create a member variable for each control. At the same time, you choose a variable type and permissible range of values for each variable. ClassWizard adds the member variables to your derived dialog class.
ClassWizard then writes a data map to automatically handle the exchange of data between the member variables and the
您可能关注的文档
- C++Chapter1-2_programming.ppt
- 伯南克宏观经济学Macro Chapter 8.ppt
- Macro16The Theory of Economic Growth (II)宏观经济学(南开大学,龚刚).ppt
- Macro13 Open Economy Macroeconomics宏观经济学(南开大学,龚刚).ppt
- macro economics chapter08.ppt
- Macro10The Aggregate Supply and Aggregate Demand (AS-AD) Model宏观经济学(南开大学,龚刚).ppt
- 讲座二 Word 2010操作应用.ppt
- h3-567 控制结构和宏.ppt
- Macro17The Economic Growth in China宏观经济学(南开大学,龚刚).ppt
- 上财 宏观经济学 PPT Macroeconomic --Chapter 22 monitoring jobs and inflations.ppt
最近下载
- 求职简历模板免费下载-简历模板免费下载-word.docx VIP
- 2024年医院行风建设总结.pdf VIP
- FR 6011 说明书.pdf VIP
- 2025年中考物理总复习:压强(讲义)解析版.pdf VIP
- 酸碱盐-初升高化学知识复习讲义(人教版).pdf VIP
- 农业开发生态养鸡项目实施方案(有全套附表附图).doc VIP
- 劳动合同范本(2026年通用版,带试用期条款).docx VIP
- 医疗器械软件注册审查指导原则(2022年修订版)20220309.pdf VIP
- 老电影收藏1(1949—1966).doc VIP
- 西南18J517_厨房_卫生间_浴室设施_标准图集.pdf VIP
原创力文档

文档评论(0)