🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #1978

The 'root' or 'background' window in Windows

#1978
From: Mikael Kindborg
Date: Sat, 11 Nov 1989 12:11
28 lines
1540 bytes
------
There have been a few questions lately concerning the 'root'
or 'background' window in Windows. In fact, there exists a kind
of root window. In this text I will refer to this window as
the background window.

If you use Spy you will see that the background window has
the style WS_POPUP and the class name "desktop". I have tried
to get a handle to the background window by calling:
  FindWindow((LPSTR)"desktop", (LPSTR)NULL)
but this did not work (i.e NULL is returned).

I have also tried WindowFromPoint(), which works fine (this
is likely to be the method Spy uses). The problem is that
WindowFromPoint() is not very reliable. If a window is
maximized for instace, you can't access the background
window. Another approach is to use EnumWindows() and test
on the class name for each window. I have not tried this
method yet, so I don't know if it will work.

I would be very grateful for any suggestions on how to
access the background window in a reliable way.

Mikael Kindborg
Dep. of Computer Science
Univ of Stockholm
S-106 91 Stockholm, Sweden
Technical Details
Message-ID: <611@vall.dsv.su.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!bloom-beacon!eru!luth!sunic!vall!mikael

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!bloom-beacon!eru!luth!sunic!vall!mikael
From: mikael@vall.dsv.su.se (Mikael Kindborg)
Newsgroups: comp.windows.ms
Subject: The 'root' or 'background' window in Windows
Message-ID: <611@vall.dsv.su.se>
Date: 11 Nov 89 12:11:27 GMT
Reply-To: mikael@vall.dsv.su.se (Mikael Kindborg)
Organization: University of Stockholm, Sweden
Lines: 28