QCW9204005: Updating Code with Unlinked Dialogs in QuickCase:W

ID Number: Q83644

1.00

WINDOWS

buglist1.00

Summary:

PROBLEM ID: QCW9204005

SYMPTOMS

When using the QuickCase:W (QCASE:W) utility that comes with the

Microsoft QuickC for Windows (QC/Win) Graphical Development

Environment version 1.0, adding unlinked dialog boxes to a file

that already contains unlinked dialog boxes may generate the

following error when the file is later compiled in QC/Win:

error C2059: syntax error : '{'

CAUSE

The code for calling an unlinked dialog box is placed within a

preprocessor block delimited by a #if statement so that the code is

not compiled until it is moved to a useful location. If the code is

moved and the #if statement is deleted, QuickCase:W does not put

the #if statement back into the code, and the above error is

generated when the file is compiled.

The code generated for unlinked dialog boxes should have the

following format:

#if 0

{

/* Code for unlinked dialog box (may be multiple blocks) */

}

#endif

After moving the code and deleting the #if...#endif section, adding

new unlinked dialog boxes using QuickCase:W and updating the code

causes the unlinked dialog box section to be placed in the source

in the following manner (the #if 0 is missing):

{

/* Code for unlinked dialog box (may be multiple blocks */

}

#endif

RESOLUTION

To work around the problem, either add the #if 0 before the

unlinked dialog section or move the code to the desired locations

(deleting the #endif) before compiling.

Another solution is to leave the #if...#endif statements in the

file when editing unlinked dialog boxes. QuickCase:W puts the new

unlinked dialog box code within these preprocessor blocks when

updating, thereby allowing the compiler to successfully exclude

them from the compilation process until the user places them into

the correct location within his or her code.

STATUS

Microsoft has confirmed this to be a problem in QuickC for Windows

version 1.0. We are researching this problem and will post new

information here as it becomes available.

More Information:

To reproduce the problem, do the following:

1. Using the Dialog Editor, create a dialog box.

2. Using QuickCase:W, create a prototype that uses an unlinked dialog

box. Save and build the prototype by choosing Generate from the

Build menu.

3. Using QC/Win, move the unlinked dialog box code to the desired

location in your code. Delete the #if 0 and #endif statements. Save

the edited source file.

4. Using QuickCase:W, add another unlinked dialog box to the project

and build it by choosing Update from the Build menu.

5. Enter QC/Win and edit the source file. You will see that the code

for the new unlinked dialog box has been placed in the file without

the #if 0 statement.

Additional reference words: quickcase qcasew quick qcwin qcw