By: Steve Waring
Home Pages: Journal Dolphinharbor
Created: 20021107
Last Update: 20021115
Using Dolphin's Active-X Component wizard to generate COMInterfaces classes for the Scriptable Shell Objects, enables a Dolphin program to easily make use of services from the Windows Shell.
I had come across these interfaces during the development of the WindowsShell project, but didnt look into them more closely until I start looking for a method to add "Open with ..." and "Send to ..." commands to my applications.
Once the interfaces have been generated, very little needs to be done. The above screenshot is from a test ToGo application that consists of a presenter that creates and uses instances of the interfaces. I concentrated on three areas, but there is alot more that can be done with these interfaces.
The top group commands all create an IShellDispatch instance, and send it the #browseForFolder: message. A number of customizations can be made. The following dialog is obtained by using the BIF_USENEWUI (16r50) constant
The middle group creates an IShellDispatch instance and sends it the selected command. All these methods return immediately, and activate some Shell function, for example opening the "Run" dialog, minimizing all windows, or shutting down windows.
The bottom group works with a Folder that is choosen in the "browseForFolder" section. The list contains the Folder's FolderItems. The selected FolderItem is asked for the collection of verbs (FolderItemVerb instances) that it supports. These verbs are what can be found in the context-menu of WindowsExplorer. An instance of FolderItemVerb can then be sent the message #doit.
The following is released as TestWare ... if you have a problem with the code or technique in your environment, you will be doing me a big favor by letting me know about it
The test ToGo has been run successfully on WinXP, Win2k and Win95 (with IE5) machines.
Copyright Steve Waring 2002.