ID Number: Q82283
1.00
WINDOWS
buglist1.00
Summary:
PROBLEM ID: QCW9203005
SYMPTOMS
When using the Microsoft QuickC for Windows (QC/Win) Graphical
Development Environment version 1.0, setting a breakpoint in the
messaging procedure of a system modal dialog box and running the
program so that it will stop on that breakpoint causes Windows to
behave incorrectly and/or halt.
CAUSE
A Windows-hosted debugger cannot debug a system modal dialog box
under Windows version 3.0, and therefore neither can QC/Win. The
problem arises because the dialog box takes control of the system.
Control is therefore taken away from the debugger, which causes the
system to halt because action must be taken within the QC/Win
environment to continue execution.
This problem occurs only if the dialog box style DS_SYSMODAL is
used in the .DLG dialog box script or in the dialog box statement
of the .RC resource compiler script. This does not cause Microsoft
CodeView for Windows to halt because the process of switching to a
character-based application allows control to be transferred.
RESOLUTION
Remove the DS_SYSMODAL style from the dialog box during
debugging of the dialog box procedure. Add this style back into
the dialog box statement when debugging the dialog box procedure
is complete.
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:
The following steps illustrate the problem:
1. Run the Dialog Editor and choose New from the File menu.
2. Choose Styles from the Edit menu and select the System Modal check
box.
3. Choose OK.
4. Choose Save from the File menu to save the file.
5. Enter the name of the file (must have an .RES extension) and
choose OK.
6. Exit the Dialog Editor.
7. Run QuickCase:W and click the double chevron braces ( <<>> ) to
add a menu item.
8. Type in a name for the menu.
9. In the Link To list box, choose Dialog Box.
10. Choose the Configure Link button and a dialog box will appear
in which you can enter the name of the dialog box you want to
link to that menu item.
11. Enter the name of the previously made dialog box (.DLG file) in
the File Name edit box and choose OK.
12. Choose OK in the Insert Menu Item dialog box and the menu item
will be displayed in the prototype menu.
13. Choose Generate from the Build menu and type in a name for the
prototype file (must have a .WIN extension).
14. Choose OK and QuickCase:W will begin generating the corresponding
code files.
15. Upon completion, choose OK in the QuickCase:W dialog box and exit
QuickCase:W by choosing Exit from the File menu.
16. Run QC/Win and open the project you just created by choosing Open
from the Project menu and entering the filename in the File Name
edit box.
17. Choose OK to return to the environment.
18. Open the C file associated with your project by choosing Open from
the File menu and entering the filename in the File Name edit box.
19. Choose OK to return to the environment.
20. Locate the dialog messaging procedure and place the cursor on the
return statement within the default case for the switch statement.
Press F9 to set a breakpoint. This will cause the debugger to stop
at this location in the program when choosing the menu item
created in QuickCase:W.
21. Set Build Mode to Debug by choosing Project from the Options menu.
22. Choose F5 to build and run the application. (A dialog may appear
stating that the project file has changed. If this occurs, choose
OK and the build process will continue.)
The application will run without problems until you choose the menu
item you created. When the application tries to initialize the dialog
box, the system will begin to behave incorrectly and/or halt. At this
point, restarting the system is the only way to exit the problem.
Additional reference words: caseworks qcwin qcw 1.00 hang