Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Adding menu item [SOLVED]

    SDK Help
    0
    3
    294
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 07/05/2015 at 10:12, xxxxxxxx wrote:

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

      ---------
      I have a simple question regarding adding sub menus to the menu bar. I can add sub menus easily with the following code:

          
          
          BaseContainer * conversionContainer = GetMenu("IDS_MENU_CONVERSION", meshContainer);
          
          if (!conversionContainer) {
              Error("Could not find IDS_MENU_CONVERSION!");
              return;
          }
          
          BaseContainer newContainer;
          newContainer.InsData(MENURESOURCE_SUBTITLE, "Custom");
          newContainer.InsData(MENURESOURCE_COMMAND, "PLUGIN_CMD_" + String::IntToString(TCUSTOM_PLUGINID));
          
          conversionContainer->InsData(MENURESOURCE_STRING, newContainer);
      

      But how do I add a title to that command? I've been reading the description documentation, but its not clear for this case. Do I add it to a resource file? Are there any example resource files that match this case?

      Thanks in advanced.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 07/05/2015 at 10:33, xxxxxxxx wrote:

        instead of:

        conversionContainer->InsData(MENURESOURCE_STRING, newContainer);

        do:

        conversionContainer->InsData(MENURESOURCE_SUBMENU,&newcontainer);

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 07/05/2015 at 10:56, xxxxxxxx wrote:

          That worked, thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post