How to show “Open with” dialog?

It’s quite handy to show the standard windows open with dialog, which lists all installed applications along with a browse button. In Windows XP there is no straight forward way of doing this.

In Windows Vista onwards Microsoft has provided a shell API for this purpose. It’s called SHOpenWithDialog.

Some sample code (couldn’t test this though since I’m on XP at home)…

[sourcecode language=”cpp”]OPENASINFO Info = { 0 };
SHOpenWithDialog(NULL, &Info);[/sourcecode]

A screenshot of the dialog in XP…

Open with dialog

Open with dialog

One thought on “How to show “Open with” dialog?

  1. Hey man, I got you process list project, very nice, thankx…

    There is one more thing that I’m trying to do… is get the amount of the processor used by the process, like “task manager” … do you have idea how can I get this? using c++ or c#
    I’m building a little program that creates a report about the usage of the process listing the process and how much the process are using….

Appreciate your comments...