Page 190 - DCAP408_WEB_PROGRAMMING
P. 190
Windows Programming
Notes 7. A ......................... is used to identify the application or system feature where the dialog box
came from.
8. A ......................... is like a dialog box, except that it is presented within a window pane
instead of a separate window.
9. ......................... windows typically support several tasks, whereas dialog boxes typically
support a single task or step in a task.
10. Dialog boxes can have tabs, and if so they are called .........................
11. Property windows are a specialized type of dialog box used to view and change
......................... for an object, collection of objects, or a program.
11.3 Designing a Dialog Box
The Visual C++ environment offers a dialog resource editor for designing dialog boxes. This
editor exhibits the Controls toolbar, which displays the obtainable controls (like radio buttons,
check boxes, and pushbuttons). You choose controls from the Controls toolbar and place them
on your dialog box.
Notes You can move and resize the controls directly by means of the mouse.
!
Caution You utilize the property page for every control to state its caption and ID.
Designing a dialog box follow the steps below.
1. Creating a new dialog box and editing its caption and ID.
2. Adding the controls and editing their captions and IDs.
11.3.1 Create the Dialog Box
Now you’ll create a simple dialog box by beginning with the default dialog box that the
development environment offers.
Let us consider a dialog box to be created named as Box1.
To create the Box1 dialog box
1. With your project open, click Resource from the Insert menu,
2. In the Insert Resource dialog box, choose Dialog from the list of resource types and click
OK. ResourceView pane opens and the dialog editor window occurs, showing a default
dialog box that includes two buttons labeled OK and Cancel. The Controls toolbar also
occurs.
3. If the property page is not shown, right-click the dialog box, then click Properties on the
menu. Click the pushpin on the property page to keep it open.
4. In the ID box, type IDD_Box1. This is not a predefined ID, so you can’t choose it from the
drop-down list.
184 LOVELY PROFESSIONAL UNIVERSITY