0 Replies Latest reply on Jul 16, 2015 3:37 PM by Clan Berg

    Insert menu Add in c#

    Clan Berg

      how do I create a menu at the bar ?

      menuSol.JPG

      I want to insert a menu after the "Ajuda". how can I do this?

       

      I have the code:

       

      private bool AddMenus()
      {
          int docType = -1;
          int pos = 6;
      
          if (swApp.ActiveDoc != null)
          {
              IModelDoc2 modDoc = (IModelDoc2)swApp.ActiveDoc;
              IModelView view = (IModelView)modDoc.GetFirstModelView();
      
              if (view.FrameState != (int)swWindowState_e.swWindowMaximized)
                  pos = 5;
           }
      
          docType = (int)swDocumentTypes_e.swDocDRAWING;
          swApp.AddMenu(docType, "MyMenu", pos);
          return true;
      }