WndTabs: An Easier Way to Switch Windows in Visual Studio 6
Getting the job done fast has always been the rule of the day for developers. Unfortunately, the IDE can often be a source of wasted time. A disrupting few seconds here and there that really add up during the life of a project.
WndTabs, a $10 shareware tool by the company of the same name (WndTabs) offers a major improvement in the Visual Studio 6 IDE. No longer do you have to switch between windows using arcane keystrokes or the Window menu. All you need to do is select a tab — the same technique that has sped up file access for Visual Studio .NET developers.
After you perform the (easy) installation and start Visual Studio, a WndTabs Setup Wizard leads you through the steps required to configure the software. For example, you can choose tab activation shortcuts and keyboard shortcuts for common commands. Once the setup is complete, the WndTabs Setup Wizard offers to take you on an online tour of the features it provides.
Figure 1. The tabs that WndTabs adds to the display make it easier to move from one window to the next.
Figure 1 shows a typical view of WndTabs. The three open documents appear as tabs at the bottom of the display. When you have more documents open than can fit within a single row of tabs, WndTabs uses multiple rows. I like this feature better than the Visual Studio .NET method of squeezing everything together to make it fit in a single row. Unlike the .NET IDE, you can configure where you want the various features (such as tabs) to appear; you can place them at the top or bottom of the display as needed.
Select the Options entry on the WndTabs menu and you’ll see the WndTabs Options dialog box shown in Figure 2. Most of these options are available when you first install the product; a few require that you set up the extended features (see the “Using the Extended Features” section for details). You can change everything from the location of the tabs to the content they contain. WndTabs also lets you change the size of the tabs by limiting the amount of information they contain. You can create tab groupings so that related files appear in one place regardless of when you open the file. As with many add-in products, this one also lets you change some appearance options, such as the colors used to display the tabs. Depending on how you set your programming environment up, these color settings can come in quite handy for quickly finding what you want.
Figure 2. Set the WndTabs options to gain maximum benefit.
Some of the more interesting standard features appear on other tabs of the WndTabs Options dialog box. For example, programmers who use three-button mice can finally use them efficiently by changing the function on the CustomizeMouse tab. You’ll also find the menu, toolbar, and keyboard customizations interesting because they can greatly improve productivity. WndTabs even provides support for “Internet” keyboards—those with special buttons that are supposed to make your browser use more efficient. That same feature can now make your development more efficient, too.
Using the Extended Features
The real fun starts when you use the extended (that is, paid) version of WndTabs. (You can try out the shareware product for 4 or 5 weeks before the extended features stop working.)
Some WndTabs Options features, such as those found on the TabsAdvanced #1 and TabsAdvanced #2 tabs, only become available when you enable the extended features. For example, you can’t work with the tab grouping settings until you enable the extended feature support. WndTabs also supports a mini-toolbar for tab groups that you can’t access before you enable the extended features. I found the grouping and mini-toolbar features extremely helpful on large projects where I had multiple classes defined and screen real estate was at a premium.
WndTabs has several useful features on its tab context menu. You can save all your open files with a simple context menu selection, or close all of the open windows except the one you’re currently working on. Figure 3 shows a full list of the context menu options.
WndTabs lets you easily open a mating file, such as the .h (header) file for a .cpp file. Visual C++ developers will like the ability to open resource files as a text file so that you can see the underlying code without a lot of effort. (Opening the resource as a text file closes the Resource Editor.)
Figure 3. Use the context menus to perform tasks quickly.
The author obviously believes in sharing information, because you can get the source code for WndTabs with a simple download. However, you don’t even need to fiddle with the WndTabs source code, because the author also supplies an SDK so you can create your own extensions. (Three are currently available.) WndTabs also provides full online help, so you can learn more about WndTabs without expending a lot of effort.
You might find the WndTabs source code interesting, because it demonstrates a number of coding techniques that you won’t find elsewhere. Of course, there’s the obvious coding technique of creating a Visual Studio add-in—not a contrived example, but a real world add-in that actually does useful work. It can also be difficult to find working code (really useful code) for the SetWindowsHookEx() function. Even though .NET developers might feel that these Windows API calls are passé, some of them, like the SetWindowsHookEx() function, really are handy to know about.
You’ll find a number of other useful coding techniques in the downloadable code as well. It’s an educational experience that you get free from a developer who obviously knows what he’s doing.
There are a couple of caveats about the source code. First, the author wrote the source code in standard C/C++, so you really have to know the language to make sense of the source code. Second, the author didn’t do the best job commenting the code. Someone who knows C/C++ well won’t experience too many problems, but less experienced developers will quickly get lost.
WndTabs is a must-have addition to any Visual Studio 6 developer toolbox. The current version doesn’t support Visual Studio .NET, but this is still a great product for Visual Studio 6 users. In fact, this version also works with Visual Studio 5 and other Microsoft products such as embedded Visual C++ and CE Platform Builder.
Copyright © 2005 Ziff Davis Media Inc. All Rights Reserved. Originally appearing in Dev Source.