Adding Unlinked Dialog Boxes

Unlinked dialog boxes are dialog boxes called by the program (as opposed to ones that appear when you choose a command). Program logic determines whether the dialog appears. For example, a dialog box that warns you when you try to quit an application without saving a file is an unlinked dialog.

When QuickCase:W generates source files for an application, it inserts a dialog message processor for each unlinked dialog.

QuickCase:W lets you add unlinked dialogs to the prototyped interface. When it generates the .C source file, QuickCase:W creates a call to the dialog resource inside a nonexecuting if statement. This statement is placed near the beginning of the file.

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 invoke the dialog box, move the call to the appropriate program location and replace the if condition with a suitable test case.

·To add an unlinked dialog box:

1.From the Design menu, choose the Unlinked Dialogs command. The Unlinked Dialogs dialog box appears (Figure 5.7).

2.Select the dialog script (.DLG) file containing the dialog box you want to add.

3.Under Attributes, select either the Modal or Modeless option (explained below).

4.Also under Attributes, select the Centered check box, if desired (explained below).

5.Choose the Add button to add the dialog to the program. The dialogs in the Selected Dialogs list box will be added to the application.

6.Repeat Steps 2–5 for any other unlinked dialogs you want to add.

7.Choose OK.

The following list describes the options available for unlinked dialog boxes:

Modal

Forces the user to explicitly dismiss the dialog box before continuing with the application; clicking outside the dialog box has no effect.

Modeless

Allows the user to 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 application's window. If you do not check this option, Windows determines where to place the dialog box.

Update

Applies any attribute changes to the dialog selected in the Selected Dialogs list box. You must choose the Update button for attribute changes to take effect for previously added dialogs.

Add

Adds the script (.DLG) file in the File Name edit field to the Selected Dialogs list box. The dialogs in the Selected Dialogs list box will be added to the application.

Delete

Removes a selected script (.DLG) file from the Selected Dialogs list box.

Clear All

Removes all the script (.DLG) files from the Selected Dialogs list box.