第3章对话框与控件 内容摘要: 1使用对话框与控件 2.模态对话框 3非模态对话框 4进度条对话框 5属性页对话框 6使用通用对话框
第3章 对话框与控件 内容摘要: 1.使用对话框与控件 2.模态对话框 3.非模态对话框 4.进度条对话框 5.属性页对话框 6.使用通用对话框 返回目录
3.1 31使用对话框与控件 程序的实现步骤 1.利用 App wizard生成多文档程序( Dialog) 2.编辑口令对话框资源 3.添加控件关联变量 4.添加代码
3.1 使用对话框与控件 3.1 程序的实现步骤 1. 利用AppWizard生成多文档程序(Dialog ) 2. 编辑口令对话框资源 3. 添加控件关联变量 4. 添加代码 返回第3章
3.1 步骤1生成程序框架 Dialog) 1.项目名称: Dialog 2.选择多文档界面应用程序( Multiple document)
步骤1 生成程序框架(Dialog ) 1. 项目名称: Dialog 2. 选择多文档界面应用程序(Multiple document) 3.1
3.1 步骤2编辑口令对话框资源 请输入口令:下 ID: IDD PASSWORD DIALOG 囗令为一 0-9999之间 的琴数」 aption:“口 确定 取消 Class: CPasswordDialog 添加控件: IDC STATIC Static Text Caption:请输入口令 IDC STATIC Static Text Caption:口令为一个0-999)之间的整数 Client edge、 Static ed ge和 Modal frame选中 IDC PASSWORD EDIT Edit box password:选中 IDOK Button Caption:确定 IDCANCEL Button Caption:取消
步骤2 编辑口令对话框资源 添加控件: IDC_STATIC Static Text Caption:请输入口令 IDC_STATIC Static Text Caption:口令为一个0 - 9999之间的整数 Client edge、Static edge和Modal frame选中 IDC_PASSWORD_EDIT Edit Box Password :选中 IDOK Button Caption:确定 IDCANCEL Button Caption:取消 3.1 ID: IDD_PASSWORD_DIALOG Caption: “口令” Class: CPasswordDialog
3.1 步骤3添加控件关联变量 IDC PASSWORD EDIt int m Password Minimum value:0 Maximum value: 9999 步骤4显示对话框 在文件 Dialog. cpp的头部,加入下面的包含语句 #include"PasswordDialog. h
步骤3 添加控件关联变量 3.1 IDC_PASSWORD_EDIT int m_Password Minimum Value : 0 Maximum Value : 9999 步骤4 显示对话框 在文件Dialog.cpp的头部,加入下面的包含语句 #include “PasswordDialog.h