Desktop display confusion, not responding to "desktop display" (toggledesktop)

Source: Internet
Author: User

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 __

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.