CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Jun 2002
    Posts
    936

    Visual Studio Customization

    I try to write an add in for visual studio. Currently, I can only add one command at a time to the tools menu. I want to know how can I add a menu item with dropdown command to the tools menu or add a menu to the main menu bar after the help menu or before the help menu. See the attached picture for more info

    Using the following code in connection, single menu item commands are added in this form

    PHP Code:
    //Add a command to the Commands collection:
                        
    Command command commands.AddNamedCommand2(_addInInstance"MyVSAddinOne""MyVSAddinOne""Executes the command for MyVSAddinOne"true59ref contextGUIDS, (int)vsCommandStatus.vsCommandStatusSupported+(int)vsCommandStatus.vsCommandStatusEnabled, (int)vsCommandStyle.vsCommandStylePictAndTextvsCommandControlType.vsCommandControlTypeButton);

    //Add a control for the command to the tools menu:
                        
    if((command != null) && (toolsPopup != null))
                        {
                            
    command.AddControl(toolsPopup.CommandBar1);
                        } 
    I want to know how can I use the code below to have sub items as shown by the picture
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured