View a good navigation tool for the MFC source code

zhaozj2021-02-11  180

Learning MFC to a certain extent, you must check it out. However, there are too many files that make up the MFC source code, how can we quickly find what we want to see? Friends who have learned VC may not know such a file in a corner of your VC 6.0 installation directory: mfc.bsc. This is a good helper that learns to master VC and MFC. Relying on it to find a definition of a category of VC and MFC, you can find a definition of each predefined name and macro in the VC, find out what kind of category is declared in a file, what kind of member is there, You can also find any of the members of each class in the MFC who calls. Open your VC 6.0, first open a project, then select the menu file / open, select Browse Info File (.BSC) in the File Type column, then enter "your VC 6.0 installation directory / VC98 / MFC / SRC / ", selected file mfc.bsc, press" Open ". Then select Tool / Source Browser in the main menu, a dialog box is popped, which contains two windows. The first window is Identifier, you can enter a function name, class name, predefined name, macro name, file name here. If you enter a function name, class name, predefined name, macro name in the first window, then you can choose the first item in the second window: Definitions and References. Then press OK, you can check the definition of functions, classes, predefined names, and macros and where to be referenced. If you enter the file name in the first window, you can choose the second item in the second window: file outline, you can view what kind, what function, etc. in this file, what kind of function, and so on.

If you enter a class name in the first window, you can choose Article 3 and 4 in the second window: base classes and members and derived classes and members. You can view the base class and its members and the derived class and its members of this class after OK. If you enter a function name in the first window, you can choose the last two items in the second window: Call Graph and Caller Graph, you can view the function to call who is called and who call it.

There is also a tip: When the final result is displayed, you double-click the left mouse button on the function name, class name, predefined name, macro name, and the definition or implementation of these names is opened. .

转载请注明原文地址:https://www.9cbs.com/read-5726.html

New Post(0)