4

I'm trying to add a context window to a HTML Context editor window in visual studio, I successfully retrieved the Code Window ID from the vshlids.h file, following guides on stackoverflow.

Guid={D309F791-903F-11D0-9EFC-00A0C911004F}
GuidID=4
CmdID=1037
Type=0x00000400
Flag=0x00000000
NameLoc=Code Window

#define IDM_VS_CTXT_CODEWIN           0x040D

But with the Html Context window I'm truly in the dark:

Guid={78F03954-2FB8-4087-8CE7-59D71710B3BB}
GuidID=353
CmdID=1
Type=0x00000400
Flag=0x00000000
NameLoc=Html Context

So I do know how to get the dialog showing window/menu data, I just can't find the ID for this particular one. Can anyone help me with getting the equivalent for the Html Context ID so I can add a menu item to it's context menu? Thanks!

Sam
  • 1,634
  • 13
  • 21

1 Answers1

2

Using the debug trick from this page: Using EnableVSIPLogging to identify menus and commands

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\General] “EnableVSIPLogging”=dword:00000001

I got the following info:

Guid = {78F03954-2FB8-4087-8CE7-59D71710B3BB}
GuidID = 329
CmdID = 1
Type = 0x00000400
Flags = 0x00000000
NameLoc = HTML Context

Translated that to my VSPackage .vsct file:

<GuidSymbol name="HTMLContext" value="{78F03954-2FB8-4087-8CE7-59D71710B3BB}">
  <IDSymbol name="menu" value="0x0001"/>
</GuidSymbol>

So the code for the context menu becomes:

<Group guid="guidCmdSet" id="contextMenuGroup" priority="0x0100">
  <Parent guid="HTMLContext" id="menu" />
</Group>

And then my context menu started showing up

I am using the Visual Studio "15" preview on Windows 10*

FoldFence
  • 2,674
  • 4
  • 33
  • 57
sboulema
  • 837
  • 1
  • 10
  • 22
  • That last code block with the priority attribute is probably the part that where I was mistaken. I also got to the `value="0x0001"` but maybe I did something wrong, I will verify the above this evening and mark answered if valid. Thank you so much. – Sam Apr 13 '16 at 12:21