是否可以创建无法通过枚举找到的 win32 消息传递窗口?
Is it possible to create a win32 messaging window that won't be found by enumerating?
我正在尝试使用以下代码枚举所有win32窗口:
EnumChildWindows(GetDesktopWindow(),
WindowManager::enumChildWindows,
reinterpret_cast<LPARAM>(this));
BOOL CALLBACK WindowManager::enumChildWindows(HWND hwnd, LPARAM lParam) {
WindowManager* manager = reinterpret_cast<WindowManager*>(lParam);
//
// Do stuff with child window handle (hwnd)
//
// Return TRUE to continue enumeration, FALSE to stop.
return TRUE;
}
因此,基本上,我通过从WinAPI调用GetDesktopWindow( VOID )
函数来获得最顶部的窗口,并通过再次从WinAPI中调用EnumChildWindows( __in_opt HWND hWndParent, __in WNDENUMPROC lpEnumFunc, __in LPARAM lParam)
函数来枚举子窗口。
简单地说,我的问题是,通过这种方法,我能错过任何win32窗口吗?有人能隐藏win32窗口,使这种方法无法枚举它吗?
提前谢谢。
按照您的方式(通过EnumChildWindows(GetDesktopWindow)),这是可能的:只创建消息窗口。附言:但是您可以通过EnumChildWindows(GetAncestor(FindWindowEx(HWND_message,0,0,0),GA_PARENT)枚举仅消息窗口:请参阅FindWindow如何找到EnumChildWindows';t?。
相关文章:
- Libmosquitto publish 不会将所有消息传递到 Azure IoT Hub
- 线程消息传递或更好:在"大师班"中访问其他班级的成员
- 如何在 boost::asio 中将打包的结构作为消息传递?(无序列化)
- "Guaranteed Delivery"消息传递 - 我应该使用 MQTT 还是 ZeroMQ?
- 核心消息传递中未处理的异常.dll在程序关闭期间
- Microsoft具有本机消息传递和非持久连接的边缘扩展不起作用
- Win32 消息队列在使用 OpenGL 渲染时被淹没
- Firebase C 云消息传递背景问题
- 从客户端到浏览器的CEF中的消息传递序列化
- 我们是否可以使用 FireBase 云消息传递来发送或接收消息,或者在 Windows 桌面/控制台或 Linux 控制
- 如何将WM_KEYDOWN消息传递到 IWebBrowser2 实例
- 如何在 GNU Radio 中实现消息传递
- msgpack:C++和Java之间的消息传递
- 增强ASIO和线程之间的消息传递
- 交流时Chrome本机消息传递错误
- win32消息泵,do dispatchMessage()处理整个消息队列或仅仅是顶部消息
- Win32 消息循环 - 我应该中断还是返回
- 多线程C++消息传递
- 跨平台最佳 MVC 模型到控制器消息传递方法(C#、Objective-C++)
- 是否可以创建无法通过枚举找到的 win32 消息传递窗口?