C++程序不响应任务栏上的平铺/层叠窗口
我有一个复杂的 C++ 程序(老式 Win32 和 WTL 的混合体),它不响应任何任务栏平铺/级联请求(即右键单击任务栏并选择“级联窗口”或“并排显示窗口”) 。当我使用spy++时,我发现我的窗口没有接收任何窗口消息,而其他程序(在本例中为Firefox)收到一系列WM_GETMINMAXINFO、WM_SIZE、WM_PAINT ...
我的框架窗口的样式为WS_OVERLAPPEDWINDOW。在创建框架窗口之前,我创建了几个隐藏窗口。我在多个不同的操作系统上进行了测试,症状是相同的。 Windows shell 向我的框架窗口发送消息是否有任何限制或先决条件?
I have a complicated program in C++ (hybrid of old-school Win32 and WTL) which does not respond to any taskbar tile/cascade request (i.e. right click on task bar and select "Cascade Windows" or "Show window side by side"). When I use spy++, I found that none of my window is receiving any window message, while other programs (in this case, Firefox) get a series of WM_GETMINMAXINFO, WM_SIZE, WM_PAINT ...
My frame window is styled as WS_OVERLAPPEDWINDOW. I create several hidden windows before creating the frame window. I have tested on multiple different OS'es and the symptoms are the same. Is there any limitation or prerequisites for Windows shell to send out messages to my frame window?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Windows 将消息发送到任务栏按钮代表的窗口。
在您的应用程序中,我在这里猜测一下,它是由任务栏按钮表示的隐藏窗口之一。窗口管理器不会将任何这些消息发送到隐藏窗口。
您可以通过将主窗口安排在任务栏中显示来解决该问题。您可以在标题为 窗口功能。
Windows sends the messages to the window which is represented by the taskbar button.
In your app, and I'm guessing a bit here, it is one of the hidden windows which is represented by the taskbar button. The window manager won't send any of these messages to a hidden window.
You can solve the problem by arranging that the main window is the one represented in the taskbar. You can read all about the gory details of which windows appear in the taskbar in the excellent MSDN topic titled Window Features.