Question

I tried to paint on my windows desktop using GetDesktopWindow(). But i failed because desktop repaints itself rapidly and my painting doesn't appear. So I need to replace my desktop window obtained by GetDesktopWindow() with ownerdraw application window Can anyone has an idea, how to do this ?

Thanks in advance, Milan

Was it helpful?

Solution

I don't think this is possible. What I did when I wrote a 'desktop toy' that manipulated the desktop was to take a screenshot, create a window as big as the desktop and put the screenshot on the back of my application window. This did stop things like the start menu and the desktop icons from working of course but that was fine for my purpose, don't know what you're trying to do.

You could try to subclass the window you get from GetDesktopWindow()... Somehow I have a suspicion though that Windows has safeguards against this sort of shenanigans.

OTHER TIPS

You can't replace the desktop window. But you can make it draw whatever you want.

Just put whatever you want to paint into a bitmap, and select that as the desktop background bitmap using SystemParametersInfo SPI_SETDESKTOPWALLPAPER

I have a few itches with Windows desktop and one alternative I'm evaluating is Windows KDE ...

http://windows.kde.org/

That's a Windows version of the (normally) Linux Qt based KDE windowing system.

I explains how to replace the windows shell (desktop) in the install information. In my case I'm playing it safe. I'm keeping my old account (to save be brief, I just copy the account information while logged in as an administrator to "copy of me" folder).

And I am playing with KDE as a separate user for evaluation.

As an answer to the question, there's info. in the install documentation and in the code base to cover 96% of your question. Share the rest with most of us :-)

\_w_/

You could change your default shell in registry to your own application.

I tried that replacing explorer.exe with cmd.exe in the registry and it worked. When I reboot the machine I could only see a command prompt.

As admin, create a copy of C:/windows/explorer.exe and save it as explorer.exe.old, delete explorer.exe, and copy your application to C:/windows as explorer.exe. Reboot, signin, and theoretically, it should be there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top