(C ++ / Windows 10)在图标之前获取一个在壁纸上绘制的句柄

(C ++ / Windows 10)在图标之前获取一个在壁纸上绘制的句柄

问题描述:

问候,

我已经找到了这个问题的几个答案,但它们已经过时了。 

I've found a couple of answers for this question but they're outdated. 

VLC的壁纸模式代码输入!hwnd if error block。

VLC's wallpaper mode code enters in the !hwnd if error block.

 hwnd = FindWindow( _T("Progman"), NULL );
     if( hwnd ) hwnd = FindWindowEx( hwnd, NULL, _T("SHELLDLL_DefView"), NULL );
     if( hwnd ) hwnd = FindWindowEx( hwnd, NULL, _T("SysListView32"), NULL );
     if( !hwnd )
     {
         msg_Warn( p_vout, "couldn't find \"SysListView32\" window, "
                   "wallpaper mode not supported" );
         return;
     }

我将使用SFML,因此我需要手柄,但即使用GDI测试我也只能设法在墙纸上绘制所有内容。

I'm going to use SFML so i'd need the handle, but even testing with GDI i can only manage to draw on top of everything not on the wallpaper.

小心我将要在那里制作动画,我不能只创建一个新图像并无休止地更换壁纸。

Beware i'm going to have an animation going on there, i can't just create a new image and replace the wallpaper endlessly.

此外,我不必保持Windows壁纸图像。我的意思是我不介意让我的程序重绘整个壁纸,只要图标在它上面。

Also i don't have to keep the windows wallpaper image. I mean i don't mind having my program redraw the entire wallpaper, as long as the icons are on top of it.

我是知道那篇文章,但那是C#而不是C ++,虽然我理解那里发生的事情背后的解释,但我对Windows api和C#不太熟悉,无法用C ++复制它
I'm aware of that article, but that's C# not C++, and while i understood the explanation behind what happens there, i'm not familiar enough with windows api nor C# to replicate that in C++