Click here to Skip to main content
Click here to Skip to main content

Visual Studio Favorites

By , 16 Mar 2003
 

Intro

Menu shot

Visual Studio Favorites (VS Favs or VSF) is a Visual Studio 6.0 add-in that puts a shortcut and favorite access menu in the Visual Studio toolbar. This Favorites Menu is configurable, and can launch documents, programs, web shortcuts, folders, source code files, studio projects, and even browser databases - anything that Explorer can launch, this can too! All from within the comfort of your Visual Studio environment. You can configure the program to make your development life easier and quicker, with common projects and data files right at your fingertips.

In addition, VS Favs uses an XML file to store your configuration, making it very portable and easy to back up. This is extremely handy when you have to re-install Visual Studio for whatever reason, and your Tools menu has gotten deleted in the process. You can read the lovely documentation and download the installer from www.nopcode.com/visualfav at your leisure.

Please note this add-in will not work with Visual Studio 7 (a.k.a. .NET), it will only work with Visual Studio 6.0

How it works

The program is built around the updated XML 3.0 SDK that is part of the Microsoft SDK; if you do not have this, you will need to download it. This SDK is part of Internet Explorer 6.0, so most development systems already have the needed binaries - you will just need the headers and such. Since I have found the current SDK to cause problems with some of the older projects I have to maintain, the Visual Studio Favorites project has the path to the SDK includes put in it; if you install the SDK into anywhere other than C:\Program Files\Microsoft SDK, you will need to modify the project (Project Settings, C++, Preprocessor, Additional Include Paths). You can download the current Microsoft Platform SDK from Microsoft's site.

Creating add-ins for Visual Studio is not exactly a trivial matter. You need to juggle several files at once and understand how the COM objects are put together; this is why ATL is used and not MFC - ATL makes working with COM a lot easier, and since we're not using a lot of windows, MFC is complete overkill for the project.

The source code, more or less, is straight forward to understand. There is basically one main class, CConfigurationFile, which does all the handling of the XML file. Two other classes derive from that, CFavoritesMenu to display the items when the user clicks the toolbar button, and CConfigTree, which is used in the configuration dialog. The config tree class is where you might find most of the interesting bits of code, since this is where the dragging and dropping and other fun stuff takes place. Whenever the user clicks on the toolbar button, the XML file is loaded and the menu parsed.

If you're interested in how to put an add-in into Visual Studio, you'll want to look at the FavoritesAddIn, FavoritesAddInVCA, and Commands cpp and h files - these files contain the COM objects that Visual Studio uses. The FavoritesAddIn.idl of course defines these objects.

History

  • March 17th, 2003 - added support for icons.

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

About the Author

Todd C. Wilson
Web Developer
United States United States
Member
I work when you don't. Sleep is for wussies.
 
The answer is no, whatever the question is. You can't have it, you don't need it, and you'd just break it in five minutes if I give it to you anyways.
 
If you're interested, my web site is at NOPcode.com and has lots of cool stuff with programming and a one-of-a-kind Audio Server.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionDoes not allow shortcuts to folders?memberBill Gates Antimatter Particle27 Aug '02 - 22:39 
The add-in is a useful one, I'm glad it was posted. I havent looked at the source code (yet)- however unless im missing something totally obvious, you cannot add shortcuts to folders. It does not accept a folder as a file. It is of no practical use to me personally unless I can do this.
Any comments ?
 
"Life begins at 140"
AnswerRe: Does not allow shortcuts to folders?memberTodd C. Wilson28 Aug '02 - 2:01 
You're right, it does not allow you to browse-to and pick a folder item; the usual limitation in the ::OpenFile api. The only work-around for right now is the same one that you would use to enter in the GUID of system folders - manually type it in. For example, Add new, leave type as Document, and enter C:\WINDOWS for the File edit box (don't use the ... button). Hit Done. Selecting this item will then cause Explorer to pop up.
 


Visual Studio Favorites - improve your development!
GUIgui - skin your apps without XP

GeneralThat's nice :)memberPhilip Patrick25 Aug '02 - 21:13 
Very nice extention, or actually replacement to Tools menu and with cool look Smile | :) Rated 5
 
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer

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

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 17 Mar 2003
Article Copyright 2002 by Todd C. Wilson
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid