Linking Commands to Dialog Boxes

Summary: Design Suggestion

When a user chooses a command and a dialog box appears, the command is said to be “linked to a dialog box.” By convention, commands linked to dialog boxes are followed by an ellipsis (...).

A dialog box script (.DLG) file must already exist before you can link it to a QuickCase:W prototype.

NOTE:

If you make a change to a dialog box, you must regenerate the source files in order to add the change to your application.

IMPORTANT:

The Dialog Editor can produce .DLG files that contain multiple dialog boxes. However, QuickCase:W only reads .DLG files that contain a single dialog box. You must write the C code manually if you want to use multiple dialogs in a single resource file.

·To link an existing command to a dialog box:

1.Do one of the following:

Click the command you want to link the dialog box to.

Press ALT+F6 to activate the prototyped window; press ALT to activate the menu bar; highlight the item with the ARROW keys; press ENTER.

The Update Menu Item dialog box appears.

2.Select the Dialog Box option in the Link To dropdown list box.

3.Choose the Configure Link button. The Dialog Box dialog box appears (Figure 5.14).

4.Select the dialog script (.DLG) file to link to the command.

5.Choose any of the options that apply to your dialog box . Choose OK.

You can display dialog boxes with the following options:

Modal

The user must explicitly dismiss the dialog box before continuing with the application; clicking outside the dialog box produces no response.

Modeless

The user can move between the application and the dialog box at will without dismissing the dialog box. The dialog box remains on the screen until the user closes it.

Centered

Places the dialog box in the center of the application's window. If you do not check this option, Windows determines where to place the dialog box.

For more information on creating dialog resources, see Chapter 1.