This procedure assumes you have the property page open, the pushpin "clicked," and the IDD_PEN_WIDTHS
dialog resource open in the dialog editor.
To add controls to the Pen Widths dialog box
IDC_THIN_PEN_WIDTH
. IDC_THICK_PEN_WIDTH
.Thin Pen Width
:.Thick Pen Width
:.For the purposes of Scribble, you won’t have to refer programmatically to the IDs of the text boxes, so you can leave them with their default values (both have the value IDC_STATIC).
IDC_DEFAULT_PEN_WIDTHS
and its caption to Default
.The handler for this button will reset the thick and thin pens to their default widths.
The following figure illustrates designing the Pen Widths dialog box. In this illustration, the central window is the dialog editor window. The property page is below the dialog editor, and the Controls toolbar is to the right of the dialog editor.
Designing the Pen Widths Dialog Box