Newsgroups: comp.windows.ms.programmer Path: utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau From: bonneau@hyper.hyper.com (Paul Bonneau) Subject: Re: Windows Root Window (size and access) Message-ID: <1991May24.155619.14021@hyper.hyper.com> Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,) Organization: HyperCube Inc. References: <1991May22.190401.15104@unicorn.cc.wwu.edu> Date: Fri, 24 May 1991 15:56:19 GMT 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.