这个问题有150分了。这样的问题怎么没人知道,大家都来讨论一下。 请到这里看一下:http://expert.csdn.net/Expert/topic/2487/2487008.xml?temp=.880932 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你用单步跟踪一下就可以看清楚了,首先程序进入的你的这个CMainFrame中的PreCreateWindow()函数,当程序运行到return语句时又调用了基类CFrameWnd类的PreCreateWindow函数,所以这个函数调用了两次,你在TRACE宏中硬性的写上了TRACE("\nCMinFrame::PreCreateWindow ...所以从你的输出结果上看是调用了两次CMainFrame::PreCreateWindow() 经过调试可以发现PreCreateWindow被调用了两次,以下是两次执行时Call stack中的内容, 第一次: CMainFrame::PreCreateWindow() line 81 CFrameWnd::GetIconWndClass() line 666 CFrameWnd::LoadFrame() line 692 + 16 bytes CDocTemplate::CreateNewFrame() line 279 + 32 bytes CSingleDocTemplate::OpenDocumentFile() line 132 + 17 bytes CDocManager::OnFileNew() line 829 CWinApp::OnFileNew() line 29 _AfxDispatchCmdMsg() line 88 CCmdTarget::OnCmdMsg() line 302 + 39 bytes CWinApp::ProcessShellCommand() line 31 + 30 bytes CTestApp::InitInstance() line 88 + 12 bytes AfxWinMain() line 39 + 11 bytes WinMain() line 30 WinMainCRTStartup() line 330 + 54 bytes KERNEL32! bff8b86c() KERNEL32! bff8b71e() KERNEL32! bff8a0e1() 第二次: CMainFrame::PreCreateWindow() line 81 CWnd::CreateEx() line 685 + 15 bytes CFrameWnd::Create() line 564 + 79 bytes CFrameWnd::LoadFrame() line 695 + 45 bytes CDocTemplate::CreateNewFrame() line 279 + 32 bytes CSingleDocTemplate::OpenDocumentFile() line 132 + 17 bytes CDocManager::OnFileNew() line 829 CWinApp::OnFileNew() line 29 _AfxDispatchCmdMsg() line 88 CCmdTarget::OnCmdMsg() line 302 + 39 bytes CWinApp::ProcessShellCommand() line 31 + 30 bytes CTestApp::InitInstance() line 88 + 12 bytes AfxWinMain() line 39 + 11 bytes WinMain() line 30 WinMainCRTStartup() line 330 + 54 bytes KERNEL32! bff8b86c() KERNEL32! bff8b71e() KERNEL32! bff8a0e1() 怎么获得打开的记事本文件的具体路径 关于VC上自动创建的对话框窗体的问题? 怎样将CString转换为const std::string &sFileName(加急) 急问关于编译的这个问题! 怎样让线程按顺序执行? 哪里有关于DLL编程的比较权威、好的网站。 怎样看MFC库中某个类的某一函数的源码? socket发送接收的包都抓到了,但是接收端缓存内容不变? 两个图片怎么拼成一个图片,也就是两个HBITMAP怎么拼成一个HBITMAP 如何填充一个不规则的图形?? 奇了怪了,在XP里如何显示十字形光标“+”? 正确找出后定给2000分,
所以从你的输出结果上看是调用了两次CMainFrame::PreCreateWindow()
第一次:
CMainFrame::PreCreateWindow() line 81
CFrameWnd::GetIconWndClass() line 666
CFrameWnd::LoadFrame() line 692 + 16 bytes
CDocTemplate::CreateNewFrame() line 279 + 32 bytes
CSingleDocTemplate::OpenDocumentFile() line 132 + 17 bytes
CDocManager::OnFileNew() line 829
CWinApp::OnFileNew() line 29
_AfxDispatchCmdMsg() line 88
CCmdTarget::OnCmdMsg() line 302 + 39 bytes
CWinApp::ProcessShellCommand() line 31 + 30 bytes
CTestApp::InitInstance() line 88 + 12 bytes
AfxWinMain() line 39 + 11 bytes
WinMain() line 30
WinMainCRTStartup() line 330 + 54 bytes
KERNEL32! bff8b86c()
KERNEL32! bff8b71e()
KERNEL32! bff8a0e1()
第二次:
CMainFrame::PreCreateWindow() line 81
CWnd::CreateEx() line 685 + 15 bytes
CFrameWnd::Create() line 564 + 79 bytes
CFrameWnd::LoadFrame() line 695 + 45 bytes
CDocTemplate::CreateNewFrame() line 279 + 32 bytes
CSingleDocTemplate::OpenDocumentFile() line 132 + 17 bytes
CDocManager::OnFileNew() line 829
CWinApp::OnFileNew() line 29
_AfxDispatchCmdMsg() line 88
CCmdTarget::OnCmdMsg() line 302 + 39 bytes
CWinApp::ProcessShellCommand() line 31 + 30 bytes
CTestApp::InitInstance() line 88 + 12 bytes
AfxWinMain() line 39 + 11 bytes
WinMain() line 30
WinMainCRTStartup() line 330 + 54 bytes
KERNEL32! bff8b86c()
KERNEL32! bff8b71e()
KERNEL32! bff8a0e1()