Using a Dialog Box

To create and use a dialog box, follow these steps:

1.Create a dialog-box template and add it to the resource script file.

2.Create a dialog function to support the box.

3.Export the dialog function.

4.Display the dialog box by calling either the DialogBox function (for a modal dialog box) or the CreateDialog function (for a modeless dialog box).

5.Close the dialog box by calling either the EndDialog function (for a modal dialog box) or the DestroyWindow function (for amodeless dialog box).

The following sections explain each step.