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.