Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
How can I get windows to redraw the desktop wallpaper, so if I change it via the registry, then changes take effect right away using Visual C++ 6.0 or Visual Basic?
Thanks

Well, I can't help you, but I saw some posts on http://www.gamedev.net/community/forums/forum.asp?forum_id=21
about that kind of thing. Maybe you can find it there.

I'm not certain if the Windows desktop checks if its displayed desktop is that of the registry with each redraw, but in C you could try the following:
UpdateWindow(GetDesktopWindow());
But this is only a guess - it will attempt to redraw the desktop window handle and, if Windows is anything of a good operating system, it would refresh the wallpaper too.
Visual Basic most certainly has some repulsive, moronic function to do this in one call, but (knowing VB), it is safe to assume that the function will find some new creative way to occupy 15 megabytes of memory and take 3 seconds to get the job done. You have been warned.

I do alot of registry programming and have found the easiest way to be the following:
Go into the task manager (ctl)+(alt)+(del) ONLY ONCE and then highlight explore.exe with the mouse and click end task. You may have to do this more than once for it to actually end explorer and if windows comes up with the wait dialog box just click cancel.
What this does is unloads explorer from memory and causes windows to reload it as if it were loading explore.exe at startup with the new registry settings and all. I hope this helps!
borelli33@netzero.net

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |