Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

Menu item doesn't trigger ContextMenuCall

 Post Reply Post Reply
Author
Message
peterakos View Drop Down
Member
Member


Joined: 2015 Jul 13
Online Status: Offline
Posts: 309
Post Options Post Options   Quote peterakos Quote  Post ReplyReply Direct Link To This Post Topic: Menu item doesn't trigger ContextMenuCall
    Posted: 2017 Oct 03 at 12:51am

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.
Back to Top
gr4ph0s View Drop Down
Member
Member


Joined: 2015 Jul 07
Location: France
Online Status: Offline
Posts: 429
Post Options Post Options   Quote gr4ph0s Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Oct 03 at 2:09am
Hi,

How do you build your menu?
Technical lover.
Back to Top
peterakos View Drop Down
Member
Member


Joined: 2015 Jul 13
Online Status: Offline
Posts: 309
Post Options Post Options   Quote peterakos Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Oct 03 at 2:28am
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.
Back to Top
knickknack View Drop Down
Forum Moderator
Forum Moderator


Joined: 2016 Jul 01
Location: Italy
Online Status: Offline
Posts: 170
Post Options Post Options   Quote knickknack Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Oct 03 at 8:06am
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.


Edited by knickknack - 2017 Oct 03 at 8:08am
MAXON Computer GmbH
SDK Support Team
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.109 seconds.