mfc >> Source browser and VC7.1

by David Wilkinson » Sun, 26 Mar 2006 19:58:54 GMT

As I understand it, there is no source browser in VC7 or 7.1, and a VC7
MFC (or other) project does not build a .bsc file by default (as it does
in VC6). However, you can change your VC7 settings to generate .sbr
files and a .bsc file if you wish.

But there is no source browser! So I thought: "Ah, but I can use the
source browser in VC6 (which I prefer anyway ...)." But it doesn't work:
VC6 says it is not a valid source browser file. The same if VC6 tries to
open the mfc.bsc that comes with VC7.

So if VC7 has no source browser, and the VC6 one cannot read VC7 .bsc
files, who can read a VC7 .bsc file? It just seems crazy. Or am I
missing something?

David Wilkinson


mfc >> Source browser and VC7.1

by David Wilkinson » Sun, 26 Mar 2006 22:13:29 GMT






Ah, I see. You can load .bsc filkes into the Object Browser. Not as nice
to use as the VC6 source browser, but it does allow you to load more
than one object at the same time, so by loading the VC7 mfc.bsc you can
browse the MFC source.

<aside>
Actually, for you VC6 lovers out there, it is easy to use two different
.bsc files in VC6 if you write yourself macros like:

Sub BrowseLocal
'DESCRIPTION: Open Local source browser
ExecuteCommand "BrowseCloseBrowseDB"
ExecuteCommand "Browse"
End Sub

Sub BrowseMfc
'DESCRIPTION: Open MFC source browser
'Next line needed for some strange reason
On Error Resume Next
'Put correct path here!!
Documents.Open ("C:\Program Files\Microsoft Visual Studio
6\VC98\MFC\SRC\MFC.BSC")
ExecuteCommand "Browse"
End Sub

I put these on my tools menu.
</aside>

David Wilkinson




Similar Threads

1. Cannot find source file in VC7 debugger

2. changes in MFC Source "COleDataSource::DelayRenderFileData()" from VC6 to VC7

Hi,

  I am a newbie to OLE, we have a product developed in VC++6.0.This has
been recompiled in .net Visual Studio 2003. The compilation is fine but
some of te functionality like drag & drop doen't work. Debugging the
code revealed that the change in the MFC source has proven to be the
culprit. If you look at the implementation of
COleDataSource::DelayRenderFileData() implementation the line of code,

     "lpFormatEtc->tymed |= TYMED_ISTREAM|TYMED_HGLOBAL;" has been
changed to

     "lpFormatEtc->tymed = TYMED_ISTREAM|TYMED_HGLOBAL;"

because of this the format change and screws the functionality.

  Doe's any one have any idea for what reason this part of code has
been changed. Searched for any clue on net but no use.

Thanks & Regards,
Uday.

3. Source function for browser - CSharp/C#

4. Source Browser - incorrect call graph

Hi !, I have a problem with call graphs generated by the 
browser info. I have a project containing two files namely 
f1.cpp and f2.cpp both of them have a static method "foo
()" with same signature. Lets assume that the "foo()" 
method of f1.cpp calls "goo()" and "foo()" method of 
f2.cpp calls "hoo()". After building the project with 
appropriate setting for the source browser, i 
selected "foo" and visualize the call graph using the 
browser. Browser shows me that there are two definitions 
of  "foo" and "foo" calls "goo" as well as "foo" 
calls "hoo". But in the source code we have two 
different "foo" methods. Is there anyway to get the 
correct call graph for both foo separately ?.

source code f1.cpp
------------------
#include <iostream>

using namespace std;

static void goo() {
   cout << "Hello from goo of f1.cpp";
}

static void foo() {
   goo();
}

-----------------------------------------------------------
source code of f2.cpp
-----------------------------------------------------------
#include <iostream>
#include <string.h>
using namespace std;

static void hoo() { };

static void foo() {
   hoo();
}

void main() {

}
-----------------------------------------------------------

Thanks in Advance !.

5. Source browser in VS 2003 questions - Microsoft Visual C++/VC++

6. Source Browser - Incorrect call graph

Hi !, I have a problem with call graphs generated by the 
browser info. I have a project containing two files namely 
f1.cpp and f2.cpp both of them have a static method "foo
()" with same signature. Lets assume that the "foo()" 
method of f1.cpp calls "goo()" and "foo()" method of 
f2.cpp calls "hoo()". After building the project with 
appropriate setting for the source browser, i 
selected "foo" and visualize the call graph using the 
browser. Browser shows me that there are two definitions 
of  "foo" and "foo" calls "goo" as well as "foo" 
calls "hoo". But in the source code we have two 
different "foo" methods. Is there anyway to get the 
correct call graph for both foo separately ?.

source code f1.cpp
------------------
#include <iostream>

using namespace std;

static void goo() {
   cout << "Hello from goo of f1.cpp";
}

static void foo() {
   goo();
}

-----------------------------------------------------------
source code of f2.cpp
-----------------------------------------------------------
#include <iostream>
#include <string.h>
using namespace std;

static void hoo() { };

static void foo() {
   hoo();
}

void main() {

}
-----------------------------------------------------------

Thanks in Advance !.

7. Where is Tools/Source Browser ? - Microsoft Visual C++/VC++

8. Source Browser Question

I am looking at someone elses' source code. And I want to generate a caller 
graph. But this error occurs

There is no browse information for the symbol... abc.cpp

So what the heck is browse information for the symbol? and how do I generate 
it? (Given that I have the source file ready) Thanks in advance
Jack