Home > Windows API > How to show “Open with” dialog?

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)…

OPENASINFO Info = { 0 };
Info.oaifInFlags = OAIF_EXEC | OAIF_ALLOW_REGISTRATION;
SHOpenWithDialog(NULL, &Info);

A screenshot of the dialog in XP…

Open with dialog

Open with dialog

Advertisements
  1. Guilherme
    July 13, 2010 at 8:35 pm

    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….

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: