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

    Menu item doesn't trigger ContextMenuCall

    SDK Help
    0
    4
    605
    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 03/10/2017 at 00:51, xxxxxxxx wrote:

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

      ---------
      Hello.

      I  press right-click in a TreeViewCustomGUI and a menu appears with "Remove" and "Remove all" options.
      The TreeViewFunctions callback ContextMenuCall is called only when I click the second options (900001).
      It is not triggered when I click the first option.

      Thank you.

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

        On 03/10/2017 at 02:09, xxxxxxxx wrote:

        Hi,

        How do you build your menu?

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

          On 03/10/2017 at 02:28, xxxxxxxx wrote:

          Hello.

          I don't build the menu. It's already there as default I suppose.
          You can check the Active Object Dialog SDK example. If you right-click the treeview, you'll see the default menu "Remove" and "Remove All".

          The problem is that ContextMenuCall is not called when I click Remove. It's id is FIRST_POPUP_ID.
          I don't need it. I just report a possible bug.

          Thank you.

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

            On 03/10/2017 at 08:06, xxxxxxxx wrote:

            Hi Peterakos, thanks for writing us.

            After investigating, I confirm that the behavior associated to FIRST_POPUP_ID id, when used for context menus in TreeViewCustomGui, is hard-coded in Cinema API resulting in no chance to execute custom code.

            That said, it's worthy noting that this can't be considered a bug since the documentation referring to creating context menus (TreeViewFunctions::CreateContextMenu()) warnings to start the first menu id should be at least equal to ID_TREEVIEW_FIRST_NEW_ID.

            Best, Riccardo.

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