How do I get full path in title bar of Visual C++ Window?

When editing a file in the Visual C++ environment, sometimes I just get the filename with no path or just a partial path in the window title bar.  Since I am frequently looking at more than two copies of the same file at the same time, it would be helpful to see the path so that I know that I am editing the correct one.  Is there a setting for the whole Visual C++ environment that will do this for me?  Even if I had to set a flag in each file, it would save me from changing the wrong file by mistake.
bleekAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AxterCommented:
You can right click the file you're editting, and select properties.

That will give you the full path.
0
bleekAuthor Commented:
I was looking for something that would display in the title bar.  Is there a limit for the number of charactors that can be displayed in the title bar?  Frequently, the 2 files I'm looking at have the same final directory.  It's the directories right after the drive name : that I need to see.  Right clicking didn't give me the full path.
0
AxterCommented:
An alternative solution could be to add the following macro to VC++:

Sub ShowFullTitle()
MsgBox "Document full path = " + Application.ActiveDocument.FullName , vbOKOnly, Application.ActiveDocument.FullName
End Sub
0
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

AxterCommented:
Unfortunately the Caption property of the TextWindow object is readonly.
Other wize you could have done something like the following macro:
Application.ActiveDocument.Caption = Application.ActiveDocument.FullName

But like I said, Caption is readonly, so that won't work.

What version of VC++ do you have?
0
bleekAuthor Commented:
We're running Visual C++ ver. 6.0
0
ambienceCommented:
Axter , i am not finding it but is there any way to set text in status bar, its better than a msgbox
0
DanRollinsCommented:
If you open the properties box and click that little pushpin-looking thingy, then no matter what source window you click, the full path will be displayed.

In the same situation, I always drag the 'source' or 'old' file window up and to the right and the 'dest' or 'new' window down and to the left.  Having set that little rule firm and fast in my mind, I never have to wonder which window is which.

I cannot find anything anywhere that overrides the width to which DevStudio automatically truncates long filenames displayed in the source window captions.

-- Dan
0
DanRollinsCommented:
On a hunch, I tried playing around with some system metrics, with the idea that the IDE might base the truncation on some other item.  No luck (but I did not try everything).

I did discover something that is useful.  You know when you minimze a window in the IDE, it is almost impossible to tell what it is becasue it is so narrow that the truncation ends up with
   C:\...\MyP...
virtually useless.  But if you execute the following code, the minimized windows in all MDI apps will be wider, so the caption is readable:

MINIMIZEDMETRICS rMM;
rMM.cbSize= sizeof( rMM );

BOOL fRet= SystemParametersInfo( SPI_GETMINIMIZEDMETRICS, sizeof( rMM ), &rMM, 0);

rMM.iWidth= 300; // <<<--- set width of minimized window

fRet= SystemParametersInfo( SPI_SETMINIMIZEDMETRICS, sizeof( rMM ), &rMM, SPIF_SENDCHANGE );

To save it permanently, OR in SPIF_UPDATEINIFILE with the flags in the final parm

-- Dan
0
bleekAuthor Commented:
I think our paths may be to long, even with the push pin it shows "D:\..\dir2\dir3\filename.  It may not be possible to do this.
0
gpbaldazziCommented:
I use WndTabs, a powerful add-in for VS6.
It's freeware, unless you want to use the WndTabsEx module (10 $ registration)
You can have a look at:
http://www.wndtabs.com/wt/tour/

It has many features, all related to tabs appended above the editor window. One of these features is that the tab tooltip is the full path of current file. it could be helpful to you.

Gian Paolo

0
bleekAuthor Commented:
Thanks for the idea.  I looked at the link.  However, we've got over 20 machines in a development environment and can't risk adding it.
0
DanRollinsCommented:
If it happens regularly that you have two files with the same name and extension but from different directories open at the same time... you should reconsider your naming conventions!

I run accros the situation occasionally, when referring to a file from a backup copy of a project.  In that case the directory is named xMyProj rather than MyProj, so it shows up in the truncated pathname shown in window title.  But as I say, it happens rarely and I just postion the windows has a visual cue.  

Did you try keeping the property window 'pinned' open?

-- Dan
0
bleekAuthor Commented:
We are doing some parallel development which makes it necessary to have the files with the same name, just located in different directories.  The directory structure goes rather deep, so even using the push pin we are not getting the names of the top level directories listed.
0
griesshCommented:
Dear bleek

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to

     "refund the points and move to PAQ"

since nobody had a satisfying answer for you.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
DanRollinsCommented:
greissh,
I object.  I belive that my suggestion of keeping the Properties box "pinned" open would solve bleek's problem.

My other tip, of moving the two-similar-named windows to certain parts of the MDI window is also a winner...  For instance, I always place the "source" window in the top-right corner.  Then I have a visual cue that helps me keep track of which window is which.

-- Dan
0
bleekAuthor Commented:
Unfortunately, this doesn't show the whole path.  I get
d:\...\directory\directory\filename.  Someone int their infinite wisdom has the projects with exteremely big paths.  It the beginning of the paths that I need to see since when working with old and new projects, it's the first directory that is different.
0
DanRollinsCommented:
O.K.  Objection witdrawn.  -- Dan
0
bleekAuthor Commented:
Thanks to all who tried to help.
0
MindphaserCommented:
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.