Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Mon, 23 Jun 2008 10:37:06 -0700,    group: microsoft.public.platformsdk.shell        back       


ContextMenuHandlers entry in AllFileSystemObjects dups items   
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!
date: Mon, 23 Jun 2008 10:37:06 -0700   author:   ondrej421

Re: ContextMenuHandlers entry in AllFileSystemObjects dups items   
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!
date: Tue, 24 Jun 2008 08:03:40 +1000   author:   Jon Potter am

Re: ContextMenuHandlers entry in AllFileSystemObjects dups items   
>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
date: Tue, 24 Jun 2008 00:27:29 +0100   author:   David Lowndes lid

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us