When CodeWinPos is enabled, all .h files are opened on the left with the same position and size. Likewise for .c/.cpp files on the right.
CodeWinPos is a simple plugin (VSIP) for Visual Studio 2005/2008 which opens *.h files on the left half of the IDE workspace and *.c/*.cpp files on the right. It works with either the tabbed or MDI window layout options in Visual Studio 2005/2008 IDE.
Updated: March 2009 for Visual Studio 2008.
The project was completed in ~ March 2007 and I have been using it daily since then without encountering any bugs.
The download contains both the source and a setup.exe as well as a CodeWinPosSetup.msi. The setup.exe and CodeWinPosSetup.msi install the same binary VSIP addin.
CodeWinPos may be removed by invoking the uninstall routine via the Control Panel Add/Remove programs.
This plugin is an aid in an effort to use the mouse as little as possible. I use this along with another plugin which with a single CTRL-key stroke switches between *.h and *.cpp files.
Using the Code
Back in Visual Studio 6, it only took a couple dozen lines of macro to accomplish this. Now in Visual Studio 2005/2008 and the VSIP, it takes all of the code in this addin to accomplish it.
Original Project Specs
The product is a Microsoft Visual Studio 2005/2008 Integration Package (using Visual Studio SDK) which will allow the user (a developer) to have automatic control over the position of code windows when opened.
Standard Visual Studio opens code windows in either:
- The currently selected tab group if "Tabbed documents" is selected, or
- Cascading style if "Multiple documents" is selected
Using the tabbed style at least the Windows are sized consistently, but there's no consistency as far as *.Hs on the left and *.Cs on the right. With the MDI/cascading option, you're left with having to size and position code windows with the mouse every time you open them. I find it entirely cumbersome to have to reach for the mouse when I shouldn't have to.
Desired behavior with product installed: If "Tabbed documents" is selected, then *.h files will open in the left tab group and *.cpp files will open in the right tab group. If "Multiple documents" is selected, then *.h files will open in the left half of the MDI workspace and *.cpp files will be opened in the right half of the MDI workspace.