如何在visual studio上过滤调试输出窗口?

Gut*_*tth 9 c++ visual-studio visual-studio-2019

如何删除或过滤此类消息?

这很烦人,并且一直显示我不明白为什么。我使用的是 Visual Studio 2019 C++。

退出和终止或将代码卡在“假”while 循环中是否更安全? 当 x 条件不满足时,我会

阅读这行代码后: MessageBox(g_hWnd, string.data(), L"", MB_OK | MB_ICONSTOP | MB_SETFOREGROUND | MB_APPLMODAL | MB_TOPMOST);

始终显示消息:

windows\dwm\dwmapi\attribute.cpp(105)\dwmapi.dll!00007FFBE41B1940: (caller: 000000018000E820) LogHr(1) tid(83b8) 80070006 Identificador inválido.
Run Code Online (Sandbox Code Playgroud)

但是如果我MB_ICONSTOP只删除并使用: MessageBox(g_hWnd, string.data(), L"", MB_OK | MB_SETFOREGROUND | MB_APPLMODAL | MB_TOPMOST);它不会显示。

它也被其他我不知道的东西显示出来。

一些谷歌:https : //social.msdn.microsoft.com/Forums/en-US/3a5a145a-c13d-4898-bb61-a5baadc9332f/why-am-i-getting-hundreds-of-weird-messages-in-debug -output-window?forum=vcgeneral

https://developercommunity.visualstudio.com/content/problem/258494/windowsdwmdwmapiattributecpp92dwmapidll72ed3cf4-ca.html

小智 1

我已经添加了#include <Dwmapi.h>,现在它不再在调试控制台中发送垃圾邮件了。

https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmgetwindowattribute

认为错误是因为它没有加载 lib dwamip.dll