Brilliant Shell programming FAQ!

Chitchat about x² / 2X products

Moderators: fgagnon, nikos, Site Mods

danielearwicker
New Member
Posts: 3
Joined: 2003 Feb 17, 11:45
Location: UK

Brilliant Shell programming FAQ!

Post by danielearwicker »

You are clearly a 100% bona fide dude! 8)

Not only do you take the shell to pieces and find how it works and put it back together again (only better), you then write up the whole story!

I was going to write a namespace extension but now I'm completely throwing that idea out. It's much easier to write my own explorer UI that behaves exactly like explorer (except where I want to improve it), thanks to that neat trick of using the shell's own objects to do all the work with the clipboard, copy, move, drag/drop, etc.

I also mixed in the W2k IDropTargetHelper thingy so I get nice see-thru icons floating over my window when I drag from the desktop. :D

Another thing I found out when browsing the latest Platform SDK was that SHChangeNotifyRegister is now documented (or at least in shlobj.h) so I'm using that as well (works great.)

Anyway, thanks - best written documentation I've found for some time, with info I haven't seen anywhere else.
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

cheers!

so we've got ourselves another explorer replacement in the making? :)

SHChangeNotifyRegister has been "documented" (if you call that documentation) during the M$ anti-trust lawsuit last year. That's what the new xplorer2 is using
danielearwicker
New Member
Posts: 3
Joined: 2003 Feb 17, 11:45
Location: UK

Post by danielearwicker »

nikos wrote: so we've got ourselves another explorer replacement in the making? :)
Well, not really - it's not a general file manager, it's a navigation tool for the configuration files of a server product. The individual files are like functions that can call each other, so i want to show the relationships between them with arrows, and then have the directory tree be browsable just like Explorer, etc.

So it's like "large icon view" plus some other nice decorations. I store the positions and suchlike in a hidden file in each directory.

See: http://www.earwicker.com/screenshot.jpg
nikos wrote:SHChangeNotifyRegister has been "documented" (if you call that documentation) during the M$ anti-trust lawsuit last year. That's what the new xplorer2 is using
Ahh so it was you causing all that trouble, eh? Must have cost you a fortune in lawyers! :D
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

what a wicked snapshot!
surely this is not the windows list view control, is it?
how did the connector arrows come in? ownerdraw?
danielearwicker
New Member
Posts: 3
Joined: 2003 Feb 17, 11:45
Location: UK

Post by danielearwicker »

nikos wrote:what a wicked snapshot!
surely this is not the windows list view control, is it?
how did the connector arrows come in? ownerdraw?
I guess my "icon view" comment was misleading. :lol: The whole thing is ownerdrawn, just a WTL scroller window in which I paint everything. So lots of logic for handling selecting items, vectors to work out the little arrow triangles, auto-scrolling at the edge of the window, etc.

Though the icons themselves are easy, of course - the shell gives me the correct icon handle for each file and I just call DrawIcon.