vs2013 ultimate版本怎么看MFC源码

vs2013 ultimate版本怎么看MFC源码,第1张

mfc.bsc是可以查看MFC源代码的文件,其位置在MFC源代码文件夹下,Visual Studio版本不一样的话,位置也不一样。

vc6.0位置:C:/Program Files/Microsoft Visual Studio/VC98/MFC/SRC/

vc2008sp1位置:D:/Program Files/Microsoft Visual Studio 9.0/VC/atlmfc/src/mfc

类似的位置搜索下就可以找得到,MSDN上有三种方法添加.bsc文件到工程,如下原文:

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 the .bsc file will be available the next time that you open the project. You can delete the .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 across Visual Studio sessions.

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

这里介绍第三种方法,单击“视图”→“对象浏览器”,在d出的“对象浏览器”面板上“浏览”→“编辑自定义组件集”→“浏览”→“文件类型”→“源浏览器文件(*.bsc)”,然后在MFC源代码文件夹下选择mfc.bsc→“添加”→“确定.

很多自定义入口,而且控制台程序默认入口为main,对于MFC的入口,实际上他也是从WinMain开始的,只是WinMain并不在程序中显示,你去查一下头文件就知道了,或者在头文件WinMain设置断点,实际上他还会断在WinMain上,另外好像还有一个AfxMain,我忘记了你自己看头文件 追问: 嗯,但我想问的是:应该从哪儿开始分析MFC的程序。 回答: 二货啊,一般来说在代码里面最先执行的是全局变量,然后就到类名::类名App()这里,一般这里没什么,直接看Dlg的CPP,里面的初始化窗口是第二个执行的地方,其他的就是一些按钮事件等东东了


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12190152.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-21
下一篇 2023-05-21

发表评论

登录后才能评论

评论列表(0条)

保存