Click here to Skip to main content
5,787,682 members and growing! (20,488 online)
Email Password   helpLost your password?
General Programming » Macros and Add-ins » VS.NET Addins     Intermediate License: The Code Project Open License (CPOL)

Visual Studio 2005 Addin to Open Src Files (*.h/*.cpp) Consistently on the Left/Right

By mikem8

Visual Studio 2005 Addin to open *.h files on the left and *.c/*.cpp files on the right
C++, C# 3.0, C#, Windows, .NET, .NET 3.0VS2005, Visual Studio, Dev

Posted: 13 Aug 2007
Updated: 26 Feb 2008
Views: 14,495
Bookmarked: 22 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
3 votes for this Article.
Popularity: 2.23 Rating: 4.67 out of 5
0 votes, 0.0%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
2 votes, 66.7%
4
1 vote, 33.3%
5
Screenshot - CodeWinPos.jpg

Introduction

CodeWinPos is a simple plugin (VSIP) for Visual Studio 2005 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 IDE.

Background

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 and the VSIP, it takes all of the code in this addin to accomplish it.

History

Original Project Specs

The product is a Microsoft Visual Studio 2005 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.

Problem

Standard Visual Studio opens code windows in either:

  1. The currently selected tab group if "Tabbed documents" is selected or
  2. 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

mikem8



Location: United States United States

Other popular Macros and Add-ins articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 11 of 11 (Total in Forum: 11) (Refresh)FirstPrevNext
Questionfile downloaded is 0 bytememberKin Hoon0:54 25 Nov '08  
AnswerRe: file downloaded is 0 bytemembermikem84:20 25 Nov '08  
GeneralGood idea!memberrm223:15 26 Feb '08  
GeneralRe: Good idea!membermikem86:36 27 Feb '08  
GeneralInstall doesn't work?memberRoms7:39 19 Feb '08  
GeneralRe: Install doesn't work?membermikem810:37 19 Feb '08  
GeneralRe: Install doesn't work?memberRoms12:00 19 Feb '08  
GeneralRe: Install doesn't work?membermikem812:14 19 Feb '08  
AnswerRe: Install doesn't work?memberValentin Ivanov13:08 19 Feb '08  
GeneralHow is this better than splitting the window?memberShawn Poulson21:41 13 Aug '07  
GeneralRe: How is this better than splitting the window? [modified]membermikem814:40 14 Aug '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 26 Feb 2008
Editor: Deeksha Shenoy
Copyright 2007 by mikem8
Everything else Copyright © CodeProject, 1999-2009
Web18 | Advertise on the Code Project