VC++程序设计_AnlexVC++4(英文)

VC++ Programming UESTC Chapter 6 The Modal Dialog and windows common Controls What does modal dialog means? How to use control palette to add controls to your dialog window? Understand the domodal and dodata Exchange e How to add dialog control at runtime? o What are the windows common control and how to program with them
VC++ Programming @ UESTC 1 Chapter 6 The Modal Dialog and Windows Common Controls ⚫ What does modal dialog means? ⚫ How to use control palette to add controls to your dialog window? ⚫ Understand the DoModal() and DoDataExchange() ⚫ How to add dialog control at runtime? ⚫ What are the windows common control and how to program with them

VC++ Programming UESTC Chapter 6 The Modal Dialog and windows common Controls e Almost every Windows-based program uses a dialog to interact with the user e There re two kinds of dialogs: Modal and modeless With a modal dialog, the user cannot work elsewhere in the same application( more correctly the same user interface thread) until the dialog is closed o With modeless dialog, the user can work in another window while the dialog is on the screen
VC++ Programming @ UESTC 2 ⚫ Almost every Windows-based program uses a dialog to interact with the user. ⚫ There’re two kinds of dialogs: Modal and Modeless. ⚫ With a modal dialog, the user cannot work elsewhere in the same application (more correctly the same user interface thread) until the dialog is closed. ⚫ With modeless dialog, the user can work in another window while the dialog is on the screen. Chapter 6 The Modal Dialog and Windows Common Controls

VC++ Programming@UESTC Chapter 6 The Modal Dialog and windows common Controls o a dialog window almost al ways tied to a windows resource that identifies the dialogs elements and specifies their ayout The elements on the dialog are called dialog controls, which include edit control. buttons. list boxes. combo boxes labels tree views, progress indicators, sliders and so forth Windows manages these controls using special grouping and tabbing logic The dialog controls can be referenced by the C Wnd pointer or by an index number 3
VC++ Programming @ UESTC 3 ⚫ A dialog window almost always tied to a Windows resource that identifies the dialog’s elements and specifies their layout. ⚫ The elements on the dialog are called dialog controls, which include edit control, buttons, list boxes, combo boxes, labels, tree views, progress indicators, sliders and so forth. ⚫ Windows manages these controls using special grouping and tabbing logic. ⚫ The dialog controls can be referenced by the CWnd pointer or by an index number. Chapter 6 The Modal Dialog and Windows Common Controls

VC++ Programming UESTC Chapter 6 The Modal Dialog and windows common Controls Steps to add a modal dialog to an existing porject 1.Use the dialog editor to create a dialog resource that contains various control Use Class Wizard to create a dialog class that is derived from Cdialog and attached to the resource created in stepl 3. Use Class Wizard to add data member, exchange functions and validation functions to the dialog class 4. Use Class Wizard to add message handler
VC++ Programming @ UESTC 4 ⚫ Steps to add a modal dialog to an existing porject: 1. Use the dialog editor to create a dialog resource that contains various controls. 2. Use ClassWizard to create a dialog class that is derived from Cdialog and attached to the resource created in step1. 3. Use ClassWizard to add data member, exchange functions and validation functions to the dialog class. 4. Use ClassWizard to add message handler. Chapter 6 The Modal Dialog and Windows Common Controls

VC++ Programming UESTC Chapter 6 The Modal Dialog and windows common Controls
VC++ Programming @ UESTC 5 Chapter 6 The Modal Dialog and Windows Common Controls

VC++ Programming UESTC Chapter 6 The Modal Dialog and windows common Controls 5. Write codes for special control initialization (in OnInitDialog) and for the message handler. Check the OnoK function 6. Write codes in your view class to activate the dialog. Call constructor first, then call DoModal dialog member function
VC++ Programming @ UESTC 6 5. Write codes for special control initialization (in OnInitDialog) and for the message handler. Check the OnOK function. 6. Write codes in your view class to activate the dialog. Call constructor first, then call DoModal() dialog member function. Chapter 6 The Modal Dialog and Windows Common Controls

VC++ Programming UESTC Chapter 6 The Modal Dial and windows common Controls EXO6A visited Use property page to setup parameters for different controls General i Style xtended st ID: IDC_CAT Caption: Hourly v Visible V Group 厂 Help ID V Tab st
VC++ Programming @ UESTC 7 Ex06A visited. Use property page to setup parameters for different controls. Chapter 6 The Modal Dialog and Windows Common Controls

VC++ Programming@UESTC Chapter 6 The Modal Dialog and windows common Controls The Group control serves only to group two radio buttons the style tab and the hourly button has the group proper Be sure that both radio buttons have the auto property set set adio Button Properti H? General Styles Extended Styles I ID: IDC_RADIO2 Caption: Salary v Visible Group 厂Help|D 厂 Disabled M Tab stop
VC++ Programming @ UESTC 8 The Group control serves only to group two radio buttons. Be sure that both radio buttons have the auto property set on the style tab and the Hourly button has the Group property set. Chapter 6 The Modal Dialog and Windows Common Controls

VC++ Programming UESTC Chapter 6 The Modal Dialog and windows common Controls Control palette If it is not visible, right click anytoolbar and choose controls from the list Setting the tabbing order on the dialog 1. click the dialog and you'l see a layout menu occur 2. Choose Tab Order Use the mouse to set the right order Holding down the alt key and pressing the underlined letter on the label, enables the user to jump to the next control in tabbing order
VC++ Programming @ UESTC 9 Control palette If it is not visible, right click anytoolbar and choose controls from the list. Setting the tabbing order on the dialog 1. click the dialog and you’ll see a layout menu occur; 2. Choose Tab Order; 3. Use the mouse to set the right order; 4. Holding down the Alt key and pressing the underlined letter on the label , enables the user to jump to the next control in tabbing order. Chapter 6 The Modal Dialog and Windows Common Controls

VC++ Programming UESTC Chapter 6 The Modal Dialog and windows common Controls Combo box Simple: User can see all choices 2. Drop-down: User can type in any word and choose from the drop-down list 3. Drop List: Use can only select from the attached list Box 4.Use“Ctrl- Enter” to add new line on the“Data?tab section for three types of combo box +i General Data Styles I Extended Styles I listbox French ns: Spanish 0
VC++ Programming @ UESTC 10 Combo box 1. Simple: User can see all choices. 2. Drop-down: User can type in any word and choose from the drop-down list. 3. Drop List: Use can only select from the attached List Box 4. Use “Ctrl-Enter” to add new line on the “Data” tab section for three types of combo box. Chapter 6 The Modal Dialog and Windows Common Controls
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- VC++程序设计_AnlexVC++3(英文).ppt
- VC++程序设计_AnlexVC++2(英文).ppt
- VC++程序设计_AnlexVC++1(英文).ppt
- 电子科技大学《Delphi程序设计》_面向对象程序设计基础.ppt
- 电子科技大学《Delphi程序设计》_认识delphi.ppt
- 电子科技大学《Delphi程序设计》_delphi语法基础.ppt
- 电子科技大学《Delphi程序设计》_delphi组件.ppt
- 电子科技大学《Delphi程序设计》_delphi应用.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第9章 预处理命令.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第8章 函数.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第7章 数组.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第6章 循环控制.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第5章 选择结构程序设计.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第4章 最简单的C程序设计一顺序程序设计.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第3章 数据类型、运算符与表达式.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第2章 程序的灵魂一算法.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第1章 C语言概述.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第13章 文件.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第12章 位运算.ppt
- 清华大学出版社:《C语言程序设计》课程教学资源(PPT课件讲稿)第11章 结构体与共用体.ppt
- VC++程序设计_AnlexVC++5(英文).ppt
- VC++程序设计_AnlexVC++6(英文).ppt
- VC++程序设计_VisualC++(英文).doc
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)目录.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第10章 中间件技术.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第11章 数据库与WWW.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第12章 XML技术.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第1章 数据库概论.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第2章 关系模型和关系运算理论.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第3章 关系数据库语言SQL.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第4章 关系数据库的规范化设计.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第5章 数据库设计和ER模型.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第6章 数据库的存储结构.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第7章 系统实现技术.ppt
- 复旦大学:《数据库系统教程》电子教案(PPT教学课件)第9章 分布式数据库系统.ppt
- 太原广播电视大学《计算机应用基础》课程教学课件(PPT讲稿).ppt
- 桂林电子科技大学:《数据结构》课程电子教案(PPT课件)第一章 绪论、第二章 线性表及其顺序存储结构.ppt
- 桂林电子科技大学:《数据结构》课程电子教案(PPT课件)第七章 查找技术.ppt
- 桂林电子科技大学:《数据结构》课程电子教案(PPT课件)第三章 线性链表.ppt
- 桂林电子科技大学:《数据结构》课程电子教案(PPT课件)第九章 排序.ppt