如何使“永远在底”的窗口 [英] How to make 'always-on-bottom'-window
问题描述
delphi和c#解决方案(或部分解决方案/提示) )
警告建议您可以通过调用SetParent和将窗口设置为桌面的孩子。如果这样做,您会导致Win32窗口管理器将桌面的输入队列与您的子窗口组合,这是一个坏的东西 - Raymond Chen解释为什么。
另外,保持介意使用HWND_BOTTOM调用SetWindowPos是不完整的。当你的窗口改变zorder时,你需要这样做。处理WM_WINDOWPOSCHANGING事件,查看SWP_NOZORDER了解更多信息。
Does anybody know how to make a 'always-on-bottom'-windows, or a window pinned to the desktop? It should receive focus and mouseclicks, but should stay at the bottom of the Z-order. It would also be great if it could stay on the desktop even when user do a minimize all or show desktop operation.
Both delphi and c# solutions (or partial solutions/hints) would be great.
Warning It was suggested that you can accomplish this by calling SetParent and setting the window to be a child of the Desktop. If you do this, you cause the Win32 Window Manager to combine the input queue of the Desktop to your child window, this is a bad thing - Raymond Chen explains why.
Also, keep in mind that calling SetWindowPos with HWND_BOTTOM is incomplete. You need to do this whenever your window is changing zorder. Handle the WM_WINDOWPOSCHANGING event, look at SWP_NOZORDER for more info.
这篇关于如何使“永远在底”的窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!