To use internal objects, properties and methods of a Visual C++ 6 application in your tests, compile the application as follows:
-
Open your project in Microsoft Visual C++ 6.0.
-
(Optional). To keep your release configuration intact, choose Build | Set Active Configuration and select another configuration, say Debug, as active for the project. Usually the Debug configuration is similar to this:
<Your_Project_Name> - Win32 Debug, i.e.
-
Include the run-time type information (RTTI) information into your executable. To do this:
-
Activate the Project Settings dialog (press Alt+F7 or use the Project | Settings menu item).
-
Switch to the C/C++ page, select the C++ Language category and check Enable Run-Time Type Information (RTTI).
-
Click OK to close the dialog.
-
-
A Visual C++ application can be opened either with wrapper classes only or with both wrapper classes and Debug Info Agent™ (see Testing Visual C++ Applications - Overview).
If you are going to “open” the application with wrapper classes for MFC, then you are done. All you have to do is re-compile the application (Step 6).
If you are going to “open” the application with the Debug Info Agent™, then you need to change other settings to supply the Debug Info Agent™ with RTTI and debug information. We included RTTI in Step 3. To include debug information:
-
Activate the Project Settings dialog (press Alt+F7 or use the Project | Settings menu item).
-
Switch to the C/C++ page of the Project Settings dialog and select either Program Database or Program Database for Edit and Continue from the Debug Info combo box. For more information on these options, review Microsoft Visual C++ help.
-
Switch to the Link tab and choose the General category from the combo box. Then activate the Generate debug info option and uncheck the Enable profiling check box.
-
On the Link page, choose the Customize category, select the Use program database check box and specify the path and name of the debug information file in the Program database name box:
-
On the Link page, choose the Debug category and clear the Separate types check box:
-
-
Switch to the General page and choose the desired MFC configuration in the Microsoft Foundation Classes combo box:
If you use the Use MFC in a Shared DLL option, you need to: -
Copy MFC debug information files to the compiled application’s folder. For instructions, see Downloading MFC Debug Information.
-
Enable the Read debug information for statically linked libraries option in your TestComplete project.
-
Re-compile the application.
When your application is ready for the final delivery, remember to compile it without debug information and RTTI to reduce the application size.
See Also
Testing Visual C++ Applications - Overview
Changes in MFC Classes Notation
Compiler Settings for Visual C++ Open Applications Created With Intel C++
Compiler Settings for Visual C++ 7.x Open Applications (Unmanaged Code)
Compiler Settings for Visual C++ 8.0 and Later Open Applications (Unmanaged Code)