views:

337

answers:

2

I want to replace the standard system open file dialog with the one I wrote, that means no matter within which programs you are opening a file, my dialog will be shown instead of the standard one, is this possible?

It seems that that there is no such API provided to accomplish this, is it possible to use some hooking technique, but this has to be reliable and not to be treated as spyware by anti-virus tools?

any other options?

If this is not possible, is it possible to add to the spacebar or toolbar in the standard open file dialog a button which invokes my dialog, which allow users select a file and in turn returns the path of the selected file to the "File name" input box of the standard dialog?

Any hits, links and code examples will be appreciated.

+1  A: 

It has nothing to do with Shell extension
Just hook it (Win32 FAQ since Win95, see Google Groups)

+1  A: 

Starting in Vista, the FileOpen/FileSave dialogs are now "Common Item Dialogs" of which IFileOpenDialog & IFileSaveDialog are the two published implementations.

Since they're just COM objects with known CLSIDs you might get away with just replacing them by re-registering using their CLSIDs. Never tried something like that, might trip all sorts of alarm bells.

Pre-Vista file dialogs can be hooked in process, but I've never come across anything about global hooks or equivalent.

Kevin Montrose