

One note that isn't mentioned in the article: The C-like casts can be replaced with reinterpret_casts, according to your coding preferences. If we found that window, we take its next sibling and assign it to workerw.ĮnumWindows(EnumWindowsProc, (LPARAM)&wallpaper_hwnd) We enumerate all Windows, until we find one, that has the SHELLDLL_DefView SendMessageTimeout(progman, 0x052C, 0, 0, SMTO_NORMAL, 1000, nullptr) HWND progman = FindWindow(L"ProgMan", NULL) *ret = FindWindowEx(NULL, hwnd, L"WorkerW", NULL) Gets the WorkerW Window after the current one. HWND p = FindWindowEx(hwnd, NULL, L"SHELLDLL_DefView", NULL) BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) Here i'll write a C++ equivalent keeping comments from the source. In the mentioned article you can see together with C# implementation an explanation of every step. That window achieves the fade-in effect for the new wallpaper, and is created by the Program Manager. Long story short, the smooth fading animation you see on Windows 10 when changing wallpaper is achieved by creating a new window that does exactly what you're asking for, drawing under the icons. The article explains the theory behind the solution, which applies regardless of the programming language being used.

Credits to this draw behind desktop icons C# page as reference.
