Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I found <a href="http://www.codeproject.com/KB/macros/addingmenuitems.aspx" rel="nofollow">this link</a> to be <em>very</em> useful.</p> <p>Inside the OnConnection method, I had this:</p> <pre><code>CommandBars cmdBars = (CommandBars)applicationObject.CommandBars; CommandBar codeWindowCmdBar = cmdBars["Code Window"]; CommandBarPopup doxygenPopup = (CommandBarPopup)codeWindowCmdBar.Controls.Add(MsoControlType.msoControlPopup, System.Reflection.Missing.Value, System.Reflection.Missing.Value, 1, true); doxygenPopup.Caption = "Doxygen Commenting"; CommandBarControl mnuListItem = (CommandBarControl)doxygenPopup.Controls.Add(MsoControlType.msoControlButton, System.Reflection.Missing.Value, System.Reflection.Missing.Value, 1, true); mnuListItem.Caption = "Wrap as List Item"; mnuListItemHandler = (CommandBarEvents) applicationObject.Events.get_CommandBarEvents(mnuListItem); mnuListItemHandler.Click += mnuListItemHandler_Click; CommandBarControl mnuUnorderedList = (CommandBarControl)doxygenPopup.Controls.Add(MsoControlType.msoControlButton, System.Reflection.Missing.Value, System.Reflection.Missing.Value, 2, true); mnuUnorderedList.Caption = "Wrap as Unordered List"; mnuUnorderedListHandler = (CommandBarEvents)applicationObject.Events.get_CommandBarEvents(mnuListItem); mnuUnorderedListHandler.Click += mnuUnorderedListHandler_Click; CommandBarControl mnuOrderedList = (CommandBarControl)doxygenPopup.Controls.Add(MsoControlType.msoControlButton, System.Reflection.Missing.Value, System.Reflection.Missing.Value, 2, true); mnuOrderedList.Caption = "Wrap as Ordered List"; mnuOrderedListHandler = (CommandBarEvents)applicationObject.Events.get_CommandBarEvents(mnuListItem); mnuOrderedListHandler.Click += mnuOrderedListHandler_Click; </code></pre> <p>Inside the click event handlers I did whatever was needed. </p> <p>Please not that this was for a main menu item with sub items. For just a single item, check out <a href="http://msdn.microsoft.com/en-us/vstudio/Video/bb614548" rel="nofollow">this video</a>. The guy goes step by step... Very well done.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload