Modal and Modeless Dialog Boxes
You can use class CDialog to manage two kinds of dialog boxes:
- Modal dialog boxes, which require the user to respond before continuing the program
- Modeless dialog boxes, which stay on the screen and are available for use at any time but permit other user activities
The resource editing and ClassWizard procedures for creating a dialog template are the same for modal and modeless dialog boxes.
Creating a dialog box for your program requires the following steps:
- Use the dialog editor to design the dialog box and create its dialog-template resource.
- Use ClassWizard to create a dialog class.
- Use ClassWizard to connect the dialog resource’s controls to message handlers in the dialog class.
- Use ClassWizard to add data members associated with the dialog box’s controls and to specify dialog data exchange and dialog data validations for the controls.
See Also Life Cycle of a Dialog Box
本文介绍了两种类型的对话框:模态对话框和非模态对话框,并详细阐述了它们的特点及创建过程。模态对话框要求用户响应才能继续程序运行;而非模态对话框则允许用户同时进行其他操作。创建对话框需要使用对话编辑器设计模板资源,并通过ClassWizard创建对话类、连接控件到消息处理程序等步骤。
1508

被折叠的 条评论
为什么被折叠?



