Archive

Posts Tagged ‘Vista API’s’

How to show “Open with” dialog?

February 12, 2010 1 comment

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

New API’s introduced for Vista!

May 2, 2008 5 comments
%d bloggers like this: