Simsons
Simsons

Reputation: 12745

Rightclick Context Menu Position is getting Changed on right click of different objects

I have created a ShellExtension which add "Start N Application" to the windows right click menu.

But the problem is that , the position of the context meny is not fixed. When I rightclick on a drive , it shows up in 3 rd position , or if I rightclick on a file then it starts in the 5th position. Can I make it to appear at at a particular position always.

Upvotes: 0

Views: 214

Answers (1)

Anders
Anders

Reputation: 101756

The position will not just vary depending on the "registration entry point" but is also affected by the number of installed extensions and the order they were installed in. The order can probably also change based on OS version and if shift is down etc. (XP added "Pin to Startmenu" and Vista added "Copy as Path")

If you want it in a specific position you could ignore what IContextMenu tells you and always insert it at the top/bottom etc but this could possibly break IContextMenu hosts if they depend on the order of the menu items and not just the command id! (And some other extension could do the same thing as you)

Upvotes: 1

Related Questions