Why am I getting hundreds of weird messages in debug Output window?

  • Thread starter Thread starter simon22
  • Start date Start date
S

simon22

Guest
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.

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();

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

_AFXWIN_INLINE void CWnd::DrawMenuBar()
{ ASSERT(::IsWindow(m_hWnd)); ::DrawMenuBar(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.

Any suggestions anyone?







Simon

Continue reading...
 

Similar threads

S
Replies
0
Views
281
Suresh Kansujiya
S
Back
Top