How to move my command in the same section of copy/paste menu?

70 views Asked by At

I need a little bit of help to move my command in the same section of copy/paste (context menu).

enter image description here

I tried to copy the parenting of Copy command that can be found in ShellCmdPlace.vsct without success.

  <Group guid="guidSHLMainMenu" id="IDG_VS_CTXT_CMDWIN_CUTCOPY" priority="0x0100">
    <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_COMMANDWINDOW"/>
  </Group>

The only thing that I modified in my vsct file to obtain the result of the screenshot is the parent id of my menuGroup:

<Groups>
    <Group guid="guidCommand1PackageCmdSet" id="MyMenuGroup" priority="0x0500">
        <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/>
    </Group>
</Groups>

Thanks!

2

There are 2 answers

0
Jingmiao Xu-MSFT On

You can go to Tools > Customize and find this in Context menu in Commands tag: enter image description here

Then find your command and use Move Up or Move Down to move it: enter image description here

0
Ed Dore On

You don't need a menu group, as you apparently want to add your menu item (aka command) to the same menu group that the Cut, Copy, and Paste already belong to.

What you want to do here is parent your command to the already existing menu group. guidSHLMainMenu | IDG_VS_CTXT_CMDWIN_CUTCOPY.

Sincerely,