共用方式為


Creating the Dialog Resource

To design the dialog box and create the dialog resource, you use the dialog editor. In the dialog editor, you can:

  • Adjust the size and location your dialog box will have when it appears.

  • Drag various kinds of controls from a controls palette and drop them where you want them in the dialog box.

  • Position the controls with alignment buttons on the toolbar.

  • Test your dialog box by simulating the appearance and behavior it will have in your program. In Test mode, you can manipulate the dialog box's controls by typing text in text boxes, clicking pushbuttons, and so on.

When you finish, your dialog-template resource is stored in your application's resource script file. You can edit it later if needed. For a full description of how to create and edit dialog resources, see the dialog editor topics. This technique is also used to create the dialog-template resources for CFormView and CRecordView classes.

When the dialog box's appearance suits you, create a dialog class and map its messages, as discussed in Creating a Dialog Class with Code Wizards.

See Also

Concepts

Dialog Boxes

Life Cycle of a Dialog Box