Creating an About Dialog Box

Virtually all Windows applications include an About dialog box. 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 to a parent window, and creates a dialog box through which you can display output and prompt the user for input.

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

1.Create the dialog box using the Dialog Editor.

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

3.Export the dialog function in your module-definition file.

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

5.Process the WM_COMMAND message in your application code.

Once you have completed these steps, the user can display the dialog box by choosing the About command from your application's menu. The following sections explain these steps in more detail.