views:

238

answers:

3

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

A: 

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.

Roel
Thanks for your suggestion, but i want to replace windows desktop with my stand alone application,I want to develop an application which will starts when window starts and user can not access any other feature of windows desktop while my application is running.I want user to interact with my application only.
themilan
Oh, but what you want to do can be done in another way, by using another shell than explorer.exe. Look at http://en.wikipedia.org/wiki/Windows_shell_replacement , and how shells such http://www.cairoshell.com/ do it.
Roel
A: 

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

John Knoeller
I don't just want to change my desktop painting.I actually want to block windows explorer and user can have access to my application only.So I thought to replace windows desktop wnd with my application wnd.Is there any other way to block windows explorer ?
themilan
What you are talking about is _replacing_ explorer as the shell of Windows. This is theoretically possible, but Microsoft doesn't document how to do it.
John Knoeller
A: 

Hi there ...

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_/

will