Shell32 File Property Dialog

Mike McCormack mike at codeweavers.com
Wed Dec 7 12:49:04 CST 2005


Johannes Anderwald wrote:

> @@ -1185,6 +1185,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW 
>      static const WCHAR wFile[] = {'f','i','l','e',0};
>      static const WCHAR wHttp[] = {'h','t','t','p',':','/','/',0};
>      static const WCHAR wExplorer[] = {'e','x','p','l','o','r','e','r','.','e','x','e',0};
> +    static const WCHAR wProperties[] = {'p','r','o','p','e','r','t','i','e','s',0};
>      static const DWORD unsupportedFlags =
>          SEE_MASK_INVOKEIDLIST  | SEE_MASK_ICON         | SEE_MASK_HOTKEY |
>          SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI |
> @@ -1275,7 +1276,11 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW 
>          sei->hInstApp = (HINSTANCE) 33;
>          return TRUE;
>      }
> -
> +    if (sei_tmp.lpVerb)
> +    {
> +        if (!strcmpW(sei_tmp.lpVerb,wProperties))
> +            return SH_ShowPropertiesDialog(sei_tmp.lpFile);
> +    }

I should have pointed out earlier that this is not the right way to 
activate a properties dialog.  This will show the same properties dialog 
for all shell objects, which is wrong.

You should create a handler for the properties verb in the IContextMenu 
interface of the shell object that you're showing the dialog for. You 
need to modify both ->QueryContextMenu and ->InvokeCommand.

I have implement IContextMenu for the ShellLink object (shelllink.c). 
Perhaps try extending that code to make a properties dialog for the 
ShellLink object first.

The rest looks better though.

Mike



More information about the wine-devel mailing list