[shell-coding] Re: SetShellWindow

  • From: "Chris Sutcliffe" <ironhead@xxxxxxxxxx>
  • To: shell-coding@xxxxxxxxxxxxx
  • Date: Tue, 1 Mar 2005 06:40:50 -0500 (EST)

> I hope you don't use SetShellWindow just because you want to use
> explorer as your file manager - there are better ways than that. The
> only true advantage that I know of so far are automatic shell restarts
> (though I assume there must be much more to it).

The main adavantage I've found of SetShellWindow is that the window
supplied as an argument ends up 'always on bottom' without having to do
any catching of WM_WINDOWPOSCHANGING.  It also is more reliable than
catching any messages, as even if a windows is put to HWND_BOTTOM it does
not dissappear behind it.  That is the functionality I'm trying to take
advantage of it.

> You want to use Spy++ on your shell window. When I played around with it
> I received messages (WM_USER+something) every time a new item was
> created - but I failed to figure out how to handle them or how to
> interpret the parameters.

I played with capturing various messages to see if there was a relyable
way of always getting a notification when ever z-order changed to ensure
the desktop window stayed on the bottom.  The problem I ran into is that
there is not always a message sent (at least I wasn't always capturing a
message).

I think the message you captured may have been HSHELL_WINDOWCREATED and
it's family of messages.  I believe that is also a side effect of
SetShellWindow, in that the window will recieve those messages, like
registering as a shell hook.

Cheers!

Chris



__________________________________________________
Subscription options and archive:
//www.freelists.org/list/shell-coding

Other related posts: