Designing a Dialog Box

The following figure shows the Pen Widths dialog box that you will create.

Scribble’s Pen Widths Dialog Box

Suggested Reading

The Pen Widths dialog box will have the following characteristics:

Visual C++ Environment's Dialog Resource Editor

The Visual C++ environment provides a dialog resource editor for designing dialog boxes. This editor displays the Controls toolbar, which shows the available controls (such as radio buttons, check boxes, and pushbuttons). You select controls from the Controls toolbar and position them on your dialog box. You can move and resize the controls directly by using the mouse.

You use the property page for each control to specify its caption and ID.

Designing a dialog box requires three steps:

  1. Creating a new dialog box and editing its caption and ID.

  2. Adding the controls and editing their captions and IDs.

  3. Arranging and testing the controls within the dialog box.