我想创建一个窗口
CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_LAYERED, wc.lpszClassName, 0, WS_POPUP | WS_VISIBLE | WS_SYSMENU, ...);
a part桌面的。(我知道这可能是不可能的,但我想尽可能接近这种感觉)。
Thus, I need that when WIN+D is hit (or when bottom-right of the screen Show desktop
button is clicked), the window should not be hidden.
How to prevent the window to be hidden when showing desktop with WIN+D?
注意:我最初认为可以通过阻止窗口最小化来实现
(https://stackoverflow.com/questions/27781352/prevent-window-to-be-minimized?noredirect=1#comment43975051_27781352 https://stackoverflow.com/questions/27781352/prevent-window-to-be-minimized?noredirect=1#comment43975051_27781352)但正如一些用户指出的那样,似乎
这是另一个问题。
可以通过执行以下操作使窗口成为桌面的一部分:
HWND hwndOwner = GetWindow(GetWindow(GetTopWindow(0), GW_HWNDLAST), GW_CHILD);
SetWindowLong(hwndMain, GWL_HWNDPARENT, (LONG) hwndOwner);
还可以尝试另一个测试:http://files.rsdn.ru/42164/quasi_owner.zip http://files.rsdn.ru/42164/quasi_owner.zip(exe + 源代码,在 Win7-x86 上测试)。
第一个版本(并没有真正工作):
删除就足够了WS_MINIMIZEBOX
& 添加WS_EX_TOPMOST
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)