Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

An Add-in to show Visual C++ DeveloperStudio Object Model

0.00/5 (No votes)
17 Jun 2003 1  
This small add-in provides DeveloperStudio Object Model in a hierarchy TreeView and enables users to see its properties.

Sample Image - vcgenie.jpg

Introduction

Recently I spent some time to write add-ins for Visual C++ 6. The most important task was to understand how an add-in works, and the key is to grasp the DevelperStudio object model. Well, the object model is just simple, compared to things in Microsoft Office, but the study also took time and energy. After looking into MSDN articles for some days, I decided to write an add-in to visually show the model. So comes VCGenie.

VCGenie is a simple Visual C++ add-in that has only one useful method: ShowObjModel. This method invokes a dialog in which you can see the DeveloperStudio object model. It is made up of three components: a normal tree-view to show the hierarchy, a toolbar control with chart legend and a custom-drawn listbox to display properties. Not very special, but I make the listbox's appearance "Delphi/C++Builder Object-Inspector" alike because I've been used to that. :-)

When writing add-ins, I found this little tool very helpful because I can see the object model visually, and from it I can tell which object or property is available. Thus I spent less time to switch between Visual C++ and MSDN.

If you haven't used a Visual C++ add-in before, then the following steps may be helpful:

  1. Open Visual C++ IDE if it hasn't been opened yet. From the main menu, select Tools | Customize.
  2. In the "Customize" dialog, pick the "Add-in and macros" page, then click Browse.
  3. Change the file type to add-in files(*.dll), then navigate to VCGenie directory and select vcgenie.dll.
  4. After a while, VCGenie will appear in the add-in list. Verify that the check box on the left is selected.
  5. Click Close. Now you should see the new toolbar in Visual C++ IDE with just one button.
  6. Click that button to invoke the object model dialog. (To get the best results, open any project first; and then you will see the project's information in this dialog.)

If you want to compile the project yourself, then I should note here that my native language is Simplified Chinese, so you may need to change the project's resource language to your own before any build process is made.

I will be glad to hear any bug report or opinion for VCGenie. If you are a beginner to write add-ins (like me) and find it helpful for you, I will be very happy.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here