为什么我在调试输出窗口中收到数百个奇怪的消息? [英] Why am I getting hundreds of weird messages in debug Output window?

查看:69
本文介绍了为什么我在调试输出窗口中收到数百个奇怪的消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将我的大型MFC Visual C ++应用程序转换为Visual Studio 2017. 它似乎转换好了它似乎工作和运行正常,但我有一些奇怪的问题,因为。 一个问题是,当在调试模式下运行我的应用程序时,每当我做几乎涉及打开或关闭或在窗口之间切换的任何事情时,我会在输出窗口(调试选项卡)中获得大量这样的消息:

I recently converted my large MFC Visual C++ application to Visual Studio 2017.  It seemed to convert OK and it seems to work and run OK, but I have had some weird problems since.  One issue is that when running my app in Debug mode, I get a ton of messages like this in the Output Window (debug tab) whenever I do almost anything which involves opening or closing or switching between windows:

windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!65D13CF4: (caller: 695790ED) ReturnHr(322) tid(324) 80070006 The handle is invalid.
windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!65D13CF4: (caller: 695790ED) ReturnHr(323) tid(324) 80070006 The handle is invalid.
windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!65D13CF4: (caller: 695790ED) ReturnHr(324) tid(324) 80070006 The handle is invalid.
windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!65D13CF4: (caller: 695790ED) ReturnHr(325) tid(324) 80070006 The handle is invalid.
windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!65D13CF4: (caller: 695790ED) ReturnHr(326) tid(324) 80070006 The handle is invalid.
windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!65D13CF4: (caller: 695790ED) ReturnHr(327) tid(324) 80070006 The handle is invalid.
windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!65D13CF4: (caller: 695790ED) ReturnHr(328) tid(324) 80070006 The handle is invalid.
windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!65D13CF4: (caller: 695790ED) ReturnHr(329) tid(324) 80070006 The handle is invalid.
windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!65D13CF4: (caller: 695790ED) ReturnHr(330) tid(324) 80070006 The handle is invalid.
windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!65D13CF4: (caller: 695790ED) ReturnHr(331) tid(324) 80070006 The handle is invalid.

他们似乎没有停止任何工作。 但我很高兴得到这么多人。 据我所知,他们来自Windows的内心深处。 例如,我出现两个只是为了从CMainFrame成员函数中调用  DrawMenuBar();

They don't seem to stop anything working.  But I'm not happy to be getting so many of them.  As far as I can see, they're coming from deep in the bowels of Windows.  For example I get two appearing just for calling DrawMenuBar();

。  ; CWnd :: DrawMenuBar定义如下:

from within a CMainFrame member function.  CWnd::DrawMenuBar is defined like this:

_AFXWIN_INLINE void CWnd::DrawMenuBar()
	{ ASSERT(::IsWindow(m_hWnd)); ::DrawMenuBar(m_hWnd); }

所以它真的是:: DrawMenuBar(m_hWnd);这导致消息被输出。 我确定m_hWnd没有任何问题,或者应用程序根本无法正常工作。

So it's really ::DrawMenuBar(m_hWnd); that is causing the messages to be output.  I'm sure there can't be anything wrong with m_hWnd or the application wouldn't work at all.

有人建议吗?

Simon

推荐答案

>据我所知,他们来自在Windows的内部深处。

>As far as I can see, they're coming from deep in the bowels of Windows.

你在Windows 10上调试吗?

Are you debugging on Windows 10?

戴夫


这篇关于为什么我在调试输出窗口中收到数百个奇怪的消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆