Adding New Menus



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 27/09/2011 at 10:17, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   12 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hi,

    I figured out how to create new menus. But the problem is I don't know how to refresh the menu bar to reflect the addition of my new menu.
    It shows up if I switch to another layout. But that's not good.

        BaseContainer *bc = GetMenuResource(String("M_EDITOR"));    //Gets the items under the M_EDITOR section   
     if (!bc) return TRUE;  
     GeData *last = SearchPluginMenuResource();      
     BaseContainer sc;  
     sc.InsData(MENURESOURCE_SUBTITLE,String("MyNewMenu"));       //Adds a new menu entry to the UI in memory only      
     if (last) bc->InsDataAfter(MENURESOURCE_STRING,sc,last);   //Adds the new menu to the UI
    

    How do I get the menu bar to update?

    -ScottA



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 27/09/2011 at 13:59, xxxxxxxx wrote:

    Doh!

    The answer was lying right under my nose in the docs: UpdateMenus();
    If it was a snake it would have bitten me.

    -ScottA


Log in to reply