Click here to Skip to main content
15,867,835 members
Articles / Desktop Programming / ATL
Article

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

Rate me:
Please Sign up or sign in to vote.
4.65/5 (15 votes)
17 Jun 20032 min read 60.5K   739   32   7
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


Written By
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generaladd-ins Pin
Anonymous26-Sep-04 14:18
Anonymous26-Sep-04 14:18 
QuestionVC .NET 2003? Pin
Richard Pineo24-Jun-03 11:08
Richard Pineo24-Jun-03 11:08 
AnswerRe: VC .NET 2003? Pin
Jim Crafton27-Feb-05 14:51
Jim Crafton27-Feb-05 14:51 
GeneralDetails Pin
Peter Ritchie24-Jun-03 4:46
Peter Ritchie24-Jun-03 4:46 
GeneralDoesn't work in Win9x Pin
Franz Klein20-Jun-03 1:35
Franz Klein20-Jun-03 1:35 
GeneralRe: Doesn't work in Win9x Pin
YuHao21-Jun-03 22:05
YuHao21-Jun-03 22:05 
I compile this code under UNICODE. You can change project configuration to ANSI.
GeneralRe: Doesn't work in Win9x Pin
Franz Klein23-Jun-03 20:19
Franz Klein23-Jun-03 20:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.