Programming in VC++ - Developer Studio - Part IV

Started by sivaji, Jan 10, 2008, 05:25 PM

Previous topic - Next topic


Programming Stuffs in "VC++" - Technical Skills for INTERVIEW

The InfoViewer

A brand new feature of Visual C++ Version 4 is the built-in InfoViewer. The InfoViewer is a Developer Studio component for reading Microsoft MediaView titles (MVB files); most notably, the online documentation that comes with Visual C++ itself.

When Visual C++ 4 is installed on a system on which the Microsoft Developer Library was installed previously, the Visual C++ installation program will add the Developer Library media title to the set of titles that can be browsed using the InfoViewer. Unfortunately, no easy-to-use facility exists for adding other titles.

In my experimentation with Visual C++, I discovered how new titles can be added to the InfoViewer; however, this method, apart from being completely undocumented, requires manually altering Registry contents, so use at your own risk! I used this method successfully to add the MAPI SDK documentation, available for downloading from Compuserve, to the set of media titles that can be browsed using InfoViewer.

Essentially, adding a new title requires adding several subkeys and values under the HKEY_CURRENT_USER\Software\Microsoft key in the Registry. The subkeys and values that I needed to add for the MAPI SDK documentation, stored in the file f:\msdn\mapisdk.mvb, are as follows:






InfoViewer\Titles\MAPISDK.MVB\Title="MAPI Documentation"

This method works well for titles that consist of a single MVB file. I have not experimented with titles consisting of multiple MVB files.

Note once again that all the affected Registry keys are under HKEY_CURRENT_USER. Even though there is an InfoViewer subkey under HKEY_LOCAL_MACHINE, you should not alter that key or its subkeys in any way.

Hopefully, future versions of Visual C++ will make it easier to add or remove InfoViewer titles.

To browse an InfoViewer title, select the InfoView in your Project Workspace window. If you have no project open, this is the only view that is visible in that window. To select a specific article, double-click on its title; the InfoViewer will display the article together with a toolbar that contains several navigation buttons.

You can set a variety of options for the InfoViewer through the Options command in the Tools menu. InfoViewer search options can be selected through the InfoViewer tab in the Options menu; the appearance of text in InfoViewer windows can be specified using the Format tab.

Other Integrated Components

The Developer Studio, in addition to providing the features discussed in this chapter, also provides an integrated interface to some of the major Visual C++ tools.

The AppWizard is a tool for generating skeleton applications. Through the AppWizard, application skeletons for OLE component servers, containers, ODBC and DAO applications, OLE automation servers, OLE controls, and more can be created.

The ClassWizard is perhaps the most often used Visual C++ tool; in addition to being a browser tool for CCmdTarget-derived classes, it can also be used to create new classes and add member functions and variables to existing classes.

The source browser provides the capability to review definitions and references of symbols in your application.

The integrated debugger is a highly powerful symbolic debugger for C and C++ applications. It can be used to debug Win32 executables as well as dynamic link libraries.

The Visual C++ Profiler is a performance analysis tool. With the help of the Profiler, you can easily determine which areas of your application represent performance bottlenecks.

Miscellaneous Tools

The Visual C++ development system also includes a set of extra tools that are available from the Tools menu. These tools are stand-alone applications that help you exercise and test programs and components that you develop.

Microsoft Spy++

The first of these tools is Spy++, a new application for snooping messages (Figure 1.30). With Spy++, you can display all messages sent or posted to selected windows; you can also specify a subset of messages that you are interested in. Spy can also display the hierarchy of current processes, threads, and windows owned by threads; this way you can select windows for tracing that are normally hidden and could not otherwise be selected on the screen.

MFC Tracer

The MFC Tracer application (Figure 1.31) enables you to turn on various MFC trace flags. With these flags on, MFC applications that have been compiled with the debug version of the MFC Library send a variety of debugging messages to debugging output.

OLE Control Test Container

The Register Control option invokes the regsvr32.exe program. This program is used to register an OLE control. It does so by loading the control DLL (the OCX file) and calling its DllRegisterServer exported function.

The OLE Control Test Container (Figure 1.32) is useful for testing the behavior of OLE controls. You can use this application to insert any registered OLE control, invoke the control's properties and methods, and trace control notifications.

OLE Object View

The OLE Object View application (Figure 1.33) is a testing tool that enables you to view the all installed OLE types, their properties, interfaces, version numbers, type libraries, and more.

There is a series of additional tools that are not included in the Developer Studio Tools menu. These include DDESpy, a utility to monitor Dynamic Data Exchange activity; the PView process viewer utility; ZoomIn, a utility to capture and enlarge portions of your Windows screen; and WinDiff, a file and directory comparison utility.

Integration with Other Applications

The Developer Studio, in addition to presenting an excellent interface to many Visual C++ features, also provides integration with other Microsoft development tools. One, I already mentioned; through InfoViewer, the Developer Studio can be used as the reader for the Microsoft Developer Library.

Another product that the Developer Studio provides integration for is Microsoft FORTRAN. If you have Microsoft's FORTRAN PowerStation installed, you can use the Developer Studio to create and build both C++ and FORTRAN projects.

The Developer Studio can also be used in conjunction with Microsoft Test, Microsoft's scripting tool for application testing.

The Developer Studio is also integrated with Microsoft's new source code control system, Visual SourceSafe. If you have Visual SourceSafe installed, a series of additional menu commands appears, providing access to source code control functions.
Am now @ Chennai

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview