[comp.windows.ms.programmer] Windows Root Window

n8443916@unicorn.cc.wwu.edu (John Gossman) (05/23/91)

	I'd like to get access to the root window and be able to size
and scroll it.  I'm guessing I can follow the parent pointers of my own
windows back to the root, but once I've got a handle, what do I need to do
to size it?  Do I need to replace the root window with my own new window?
Or can I just reallocate its bitmap somehow?

	Any suggestions would be greatly appreciated.

// *************************************************************** //
John Gossman
SoftSource      (206)676-0999 Phone
My employer stands behind all my opinions, except in public.
// ************************************************************** //

bonneau@hyper.hyper.com (Paul Bonneau) (05/24/91)

In article <1991May22.190401.15104@unicorn.cc.wwu.edu> n8443916@unicorn.cc.wwu.edu (John Gossman) writes:
>
>	I'd like to get access to the root window and be able to size
>and scroll it.  I'm guessing I can follow the parent pointers of my own
>windows back to the root, but once I've got a handle, what do I need to do
>to size it?  Do I need to replace the root window with my own new window?
>Or can I just reallocate its bitmap somehow?
>
>	Any suggestions would be greatly appreciated.
>
Getting the desktop (root) window handle is easy -- use
GetDesktopWindow().  What you are trying to do with it
however, is evil.  The window provides all kinds of funky
behind the scenes coordination for its kids (every other
window).  Replacing it (by subclassing I assume) would
likely cause Windows to explode in your face (watch out
for shrapnel from the screen ;).

Even subclassing only the WM_PAINT message (for displaying
the backgound bitmap and wallpaper) is going to be
non-trivial if it can be done at all...

cheers - Paul Bonneau.