Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Shell Extension using ATL and WTL

0.00/5 (No votes)
18 Mar 2001 1  
Shell extension that extends the Windows Explorer user interface

Sample Image - ShellServer.gif

Introduction

Here is another Shell extension sample - the one which extends Windows Explorer's user interface.

Let me note that my sample does not do anything useful - I'll try to think of something later - it just shows how to write this kind of shell extension.

How to install it?

Copy the ShellServer.dll to any directory of your choice and register it using regsvr32.exe. Next time when you open the Windows Explorer you'll see one more folder in the left pane tree - Shell Server. Just click on it and you'll see it in action.

a ShellServer integrates its own menu, toolbar buttons, text in the status bar with Windows Explorer and displays a listview control in the right pane of Explorer with some data.

There are 4 classes in the project:

  • CFolderObj which implements IShellFolder and IPersistFolder interfaces.
  • CViewObj which implements IShellView interface.
  • CMainDlg
  • CShellListView

CFolderObj and CViewObj are implemented using ATL, CMainDlg and CShellListView use WTL.

The implementation is pretty straightforward, except for one thing - if you want to handle window messages in the listview control you have to create the modeless dialog first and place a listview control on it.

I wrote it on WinNT 4.0 sp6 and did not test on Win95/98.

That's it. Enjoy it and use it any way you want. Do not even mention my name (I am a very modest person).

Credits - www.clipcode.com

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here