ActiveX Controls

Chapter 4 - Advanced Visual C++ Features

Visual C++ 6: The Complete Reference
Chris H. Pappas and William H. Murray, III
  Copyright 1998 The McGraw-Hill Companies

Debugging and Testing
The following sections explain the use of Microsoft’s debugging and testing utilities. These utilities are used to locate an application’s logical errors or errors that are generated when the application is executed simultaneously with other programs.
Spy++
Spy++ is one of the most dynamic tools shipped with Microsoft Visual C/C++. This utility allows you to “spy” on one or all of the currently loaded Windows applications. This utility’s Window option allows you to view each application’s name, class, module, parent, display window’s rectangular screen coordinates, window style (for example, WS_CHILD), and window ID number.
Spy++ also lets you view the messages being sent throughout the environment. There are nine check boxes that allow you to predefine the reported message types:
Mouse
Input
System
Window
Init
Clipboard
Other
DDE
Non-Client
Generated output can be displayed in synchronous or asynchronous mode and sent to a Spy++ window, a file, or to COM1 for remote debugging.
Figure 4-11 shows the Spy++ Message Options dialog box with window selection data entered.
Figure 4-11: Spy++’s message Options dialog box
After you have selected the types of windows you want to watch, you use the Window menu to decide if these messages are to be watched for one window only or for all windows.
Process Viewer
Figure 4-12 shows a sample Process Viewer window. The Process Viewer dialog box allows you to quickly set and view all of the options necessary to track current processes, threads, and processor time-slicing.
Figure 4-12: A typical Process Viewer window
To start the Process Viewer, simply double-click on the PView icon in the Visual C++ group. The Process Viewer can help you answer questions such as:
  How much memory does the program allocate at various points in its execution, and how much memory is being paged out?
  Which processes and threads are using the most CPU time?
  How does the program run at different system priorities?
  What happens if a thread or process stops responding to DDE, OLE, or pipe I/O?
  What percentage of time is spent running API calls?
  Caution Since the Process Viewer lets you modify the status of processes running on your system, you can stop processes and potentially halt the entire system. Make sure that you save edited files before running the Process Viewer.
WinDiff
The WinDiff utility, found in the Visual C++ group, allows you to graphically compare and modify two files or two directories. All of the options within WinDiff operate in a manner similar to those commands found in the File Manager.
Figure 4-13 shows a WinDiff dialog box with selections made to begin the process of locating the first file to be compared.
Figure 4-13: A WinDiff dialog box

Books24x7.com, Inc 2000 –  


Visual C++ 6(c) The Complete Reference
Visual Studio 6: The Complete Reference
ISBN: B00007FYGA
EAN: N/A
Year: 1998
Pages: 207

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net