When I add my context menu shell extension to AllFileSystemObjects, Windows displays my submenu twice when I right-click on a shortcut. The submenu appears only once on all other "file system objects" I've tried so far. I can work around this by adding my shell extension to * and Directories instead, but I want to make sure I'm not doing anything wrong in the shell extension code itself. Thanks!
The shell has a default context menu handler for shortcuts that adds the menu items for the shortcut target, so I assume your extension is getting called twice - once for the .LNK file and once for the target file itself. You could use the * and Directory method as you say, or simply don't add anything for a .lnk file. "ondrej421" wrote in message news:C8369B6F-6C2F-4075-9FEA-81F7B1F15341@microsoft.com... > When I add my context menu shell extension to AllFileSystemObjects, > Windows > displays my submenu twice when I right-click on a shortcut. The submenu > appears only once on all other "file system objects" I've tried so far. > > I can work around this by adding my shell extension to * and Directories > instead, but I want to make sure I'm not doing anything wrong in the shell > extension code itself. > > Thanks!
>When I add my context menu shell extension to AllFileSystemObjects, Windows >displays my submenu twice when I right-click on a shortcut. The submenu >appears only once on all other "file system objects" I've tried so far. In your QueryContextMenu method try checking for CMF_VERBSONLY and don't add your menu option in that situation. Dave