Requirements:
Put a ws_ex_layered window on the desktop, set it to the bottom (always under other windows), and keep it on the desktop without responding to win + D.
Analysis:
1. Win + D or "show desktop" on the Quick Start bar. Actually, a shell method (ishelldispatch4.toggledesktop () is called ()), in addition, your window will not receive any messages related to this.
2. When ishelldispatch4.toggledesktop () is called, the system will send a message dtm_raise message (wm_user + 83) to the desktop (progman) to set the desktop to the front.
3. ishelldispatch4.toggledesktop () is not a simple window. I have not found a more detailed explanation of this function. (If anyone knows, please tell me. Thank you ~~~)
Do not respond to the "show desktop" solution:
-- Solution 1 --
Set the window to ws_ex_topmost style, or use setwindowpos (hwnd, hwnd_topmost,...) to "display desktop" without responding ".
Unfortunately, my demand is "bottom-up". This solution is not suitable for me.
-- Solution 2 --
Set the window to a subwindow of the desktop listview
Hwnd hprogman =: findwindow (L "progman", l "program manager ");
Hwnd hdefview = find1_wex (hprogman, null, l "shelldll_defview", null );
Hwnd hfloderviews = find1_wex (hdefview, null, l "syslistview32", null );
// When hfloderviews is used as the parent window of createwindow, the "display desktop" effect is not returned.
Unfortunately, after the window inherits from the desktop listview, The ws_ex_layered window style cannot be used.
Solutions to my needs:
Solution 1 (feasible ):
Remove the ws_ex_layered style and set the window to a subwindow of the desktop listview. This solution is certainly acceptable, but removing ws_ex_layered means that the translucent window needs to be implemented by itself, which is much more troublesome.
Solution 2
Modify requirements
_ The end __