Two methods to view the source code of MFC

Source: Internet
Author: User

First -- use the MFC. bsc source browser File

MFC. BSC is a file that allows you to view the source code of MFC. Its location is in the MFC source code folder. If the Visual Studio version is different, the location is also different.
Vc6.0 location: C:/program files/Microsoft Visual Studio/vc98/mfc/src/
Vc2008sp1 location: D:/program files/Microsoft Visual Studio 9.0/VC/atlmfc/src/MFC

You can find it by searching for similar locations. There are three methods to add the. bsc file to the project on msdn, as shown in the following Original article:

To open the. bsc file

* On the File menu, click open and open the. bsc file.

The. bsc file will be available to all projects in the solution until you either reload the solution or delete the. bsc file from Solution Explorer or the Object Browser.

To attach the. bsc file to your project

1. In Solution Explorer, right-click the project node and click Add existing item on the shortcut menu.
2. Browse to the. bsc file and add it to your project.

The. BSC file will only be available in the project to which it is added. you can save the project so that. BSC file will be available the next time that you open the project. you can delete. BSC file from Solution Explorer

To add the. bsc file to the Object Browser

* In the Object Browser, click the Customize button and browse to the desired. bsc file.

When you add. bsc files to the Object Browser With the Customize button, the files are available to all projects in any solution that you open. This setting will persist within SS Visual Studio sessions.

The. bsc file that is referenced in each method will then appear in the Object Browser.

The third method is described here. Click "View"> "Object Browser ", on the displayed "Object Browser" Panel, choose "Browse"> "Edit custom component set"> "Browse"> "file type"> "source browser file (*. BSc), and then select the MFC under the MFC source code folder. BSc → add → OK, as shown in the steps.

Shows the result.

In this case, if we want to view a function, enter "cdialog" in the "Search" box and press Enter. The queried class information is displayed on the left, on the right side are class member functions and variables. On the right side, you can press a letter starting with the function you want to search for to quickly locate the function that starts with that letter, right-click the function or variable you want to view and select "go to definition" to jump to the source code, as shown in.

The pop-up source code definition is shown in.

Second-use VAX to find source code

VAX is a visual Studio plug-in. Many VC developers use it. It can also view the source code. Start the third "find symbol" on the left of the toolbar, as shown in.

In the displayed dialog box, uncheck show only symbols defined in current solution, and enter the class or function to be retrieved, as shown in.

The result is also located on the source code, as shown in.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.