Jiri:
I don't know if this would work for you, but what I do is show the full
path on the status bar. You can easily do this by overriding
CFrameWnd::GetMessageString() and testing for ID's in the range
ID_FILE_MRU_FILE1 through ID_FILE_MRU_FILE16.
David Wilkinson
The displayed version of the file names is produced by the
CRecentFileList MFC class. You can derive a class from this and
override the CRecentFileList::UpdateMenu function. Replace its call to
GetDisplayName with something you write.
To use this new class in the app replace the standard call to
LoadStdProfileSettings with something like this:
m_pRecentFileList = new CYourMRUList(
0,
_T("Recent File List"),
_T("File%d"),
4, // 4 items on menu
200); // 200 char wide
m_pRecentFileList->ReadList();
--
Scott McPhillips [VC++ MVP]
Thank you for your suggestions, I will try both approaches (status bar
or new class derived from CRecentFileList) and let know whether it
worked. Some of my applications are dialog based, so I might prefer
the solution with the new class.
For example, I very often have the kind of problems you have.
c:\ClientName\ProjectName\ProgramName\ComponentName\SomeFileName.cpp
and
c:\OtherClientName\ProjectName\DivisionName\ProgramName\ComponentName\SomeFileName.cpp
so OF COURSE both of these are displayed as
c:\...\SomeFileName.cpp
c:\...\SomeFileName.cpp
and it is therefore OBVIOUS which file is which!
It isn't limited to VS. For example, I have files with names like
i:\Courses\PowerPoint\Windows System Programming 14.ppt
i:\Courses\PowerPoint\Windows System Programming 15.ppt
which come out with displays like
i:\Courses\...\Windows System Program...
i:\Courses\...\Windows System Program...
which shows a degree of tastelessness and stupidity in the algorithm that does the
truncation that is mind-boggling to behold. It shows a lack of understanding of user
interfaces that is deep beyond simple incompetence and moves into the area of outright
malice.
Alas, they had neither the taste nor intelligence to allow users to turn this misfeature
off. These are the same idiots who think it makes sense to issue a message that says it
is unable to copy a file "NAME". Is in NAME.cpp? NAME.h? NAME.aps? NAME.clw? NAME.ncb?
NAME.rc? NAME.txt? [Experience indicates it is NAME.ncb, but the compulsion to protect me
from the information I critically need to do my work is the result of a number of
cascading bad decisions. I have already changed the setting that says to hide extensions,
but not only do they make bad decisions, they don't test the code to make sure that the
options are properly handled everywhere...and this has been a problem for YEARS]
joe
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm