How to make windows layer divided into workerW1 and workerW2 layers in win8.1

Lucking Qing 30 Reputation points
2023-11-29T16:48:30.49+00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;



namespace ConsoleApplication9
{
    class Program
    {
        [DllImport("user32.dll")]
        public static extern IntPtr FindWindow(string className, string winName);

        [DllImport("user32.dll")]
        public static extern IntPtr SendMessageTimeout(IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam, uint fuFlage, uint timeout, IntPtr result);

        public delegate bool EnumWindowsProc(IntPtr hwnd, IntPtr lParam);
        [DllImport("user32.dll")]
        public static extern bool EnumWindows(EnumWindowsProc proc, IntPtr lParam);

        [DllImport("user32.dll")]
        public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string className, string winName);

        [DllImport("user32.dll")]
        public static extern bool ShowWindow(IntPtr hwnd, int nCmdShow);

        [DllImport("user32.dll")]
        public static extern IntPtr SetParent(IntPtr hwnd, IntPtr parentHwnd);

        public static void Main(String[] args)
        {
            IntPtr programHandle = FindWindow("Progman", null);

            IntPtr result = IntPtr.Zero;
            SendMessageTimeout(programHandle, 0x52c, new IntPtr(0), IntPtr.Zero, 0, 2, result);

            //not usefull below 
            EnumWindows((hwnd, lParam) =>
            {
                if (FindWindowEx(hwnd, IntPtr.Zero, "SHELLDLL_DefView", null) != IntPtr.Zero)
                {
                    IntPtr tempHwnd = FindWindowEx(IntPtr.Zero, hwnd, "WorkerW", null);

                }
                return true;
            }, IntPtr.Zero);
        }
    }
}

Hi, if you notice this letter, please just give a little time for this moment. As an old lover of windows all version, I find it seems no way in windows8(contain only a progman window) to get windows workerw1 and workerw2 layers separate  from window "Program Manager" Progman (spy++)  so as to add layer under desktop icon for transparency effect. Refer to the way sendmessagetoprogman

https://www.codeproject.com/Articles/856020/Draw-Behind-Desktop-Icons-in-Windows-plus

,I have tried many times. Well, Not  is there any workerw created by the message code 0x52c.

My win32 console code in vs studio given followed, it‘s so poor like my english and i make no sense. And if some errors, you could try and tell me. And then, COULD you tell me why there isn't workerW appears in spy++,AND what SHOULD to do.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,199 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,654 questions
Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
904 questions
Microsoft Managed Desktop
Microsoft Managed Desktop
A cloud-based service that brings together Microsoft 365 Enterprise and adds these features: User device deployment; IT service management and operations; and Security monitoring and response.
57 questions
{count} votes

Accepted answer
  1. Xiaopo Yang - MSFT 12,726 Reputation points Microsoft Vendor
    2023-12-01T03:20:57.06+00:00

    Well, Not is there any workerw created by the message code 0x52c.

    So I set up Spy++, opened the personalization dialog and changed the wallpaper. It turns out, that when you change the desktop wallpaper, a new WorkerW window between the WorkerW instance that holds the Desktop Icons (SysListView32) and the Desktop Manager is created.

    Did you see the new WorkerW window when you opened the personalization dialog and changed the wallpaper? I take risks to repeat that Windows8.1 has reached the end of support on January 10, 2023.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Q&A Assist
    2023-11-29T16:48:30.5133333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    I'm sorry, but I don't fully understand your question. However, based on the context provided, it seems that you are asking about how to separate the workerW1 and workerW2 layers in Windows 8.1 in order to add a layer under desktop icons for opaque effect. Unfortunately, I don't have information on how to do this. The workerW1 and workerW2 layers are used for hit testing and message-only windows, respectively, and are not meant to be manipulated directly.


    References:

    1 person found this answer helpful.

  2. RLWA32 45,701 Reputation points
    2023-12-01T08:40:37.9433333+00:00

    @Xiaopo Yang - MSFT The method described in the CodeProject article works in Windows 8.1. The undocumented 0x52c message sent to Progman creates the referenced WorkerW window.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.