Visual C++ provides many predesigned resources that you can incorporate into your projects. The default dialog box is one such resource. In this procedure, you’ll create a simple dialog box by starting with the default dialog box that the development environment provides.
To create the Pen Widths dialog box
Scribble’s ResourceView pane opens and the dialog editor window appears, displaying a default dialog box that contains two buttons labeled OK and Cancel. The Controls toolbar also appears.
IDD_PEN_WIDTHS
.This is not a predefined ID, so you can’t select it from the drop-down list.
Pen Widths
.Notice that the title bar of the dialog box reflects the new caption.
Note The OK and Cancel buttons have predefined properties, including their command IDs — IDOK and IDCANCEL, respectively. If you click the OK button and switch to the Styles tab of the property page, you will see that the Default Button check box is checked.
In the next topic, you’ll add several controls to the default dialog box resource.