2.4 Creating an About Dialog Box

You should include an About dialog box with every application. A dialog box is a temporary window that displays information or prompts the user for input. The About dialog box displays such information as the application's name and copyright information. The user tells the application to display the About dialog box by choosing the About command from a menu.

You create and display a dialog box by using the DialogBox function. This function takes a dialog box template, a procedure-instance address, and a handle of a parent window, and creates a dialog box through which your application can display output and prompt the user for input.

To display and use an About dialog box, follow these steps:

1.Create a dialog box template and add it to your resource-definition file.

2.Add a dialog box procedure to your C-language source file.

3.Export the dialog box procedure in your module-definition file.

4.Add a menu to your application's resource-definition file.

5.Process the WM_COMMAND message in your application code.

Once you have completed these steps, your application will be able to display the dialog box when the user chooses the About command from the application's menu.