简体   繁体   English

如何获取MFC对话框的对话框名称或对话框类?

[英]How to get dialog name or dialog class of MFC dialog?

I have big,old MFC source code. 我有旧的MFC源代码。 It is very difficult to debug the code. 调试代码非常困难。 I am using Spy++ to examine one of the dialog. 我正在使用Spy ++检查其中一个对话框。 Following is snapshot of Spy++ of the dialog of MFC application. 以下是MFC应用程序对话框的Spy ++快照。

Is there any way to find name of class of Dialog, or dialog ID? 有什么办法可以找到Dialog的类名或对话框ID?

Secondly, is there any tool in Visual Studio (using 2008) which can map button callback with correct method of source code. 其次,Visual Studio中是否有任何工具(使用2008)可以使用正确的源代码方法映射按钮回调。

I know second question sounds greedy, but just trying to see if this type of tool exists? 我知道第二个问题听起来很贪心,但只是想看看这种工具是否存在?

在此处输入图片说明

  • Launch the Debugger. 启动调试器。
  • Run the application. 运行应用程序。
  • Hit Break All 击破所有
  • Look into the call stack 查看调用堆栈

You should find the code location that calls DoModal. 您应该找到调用DoModal的代码位置。 And there you find the appropriate class that is used. 在这里,您可以找到所使用的适当类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM