BitmapButton in Descriptions Events



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

    On 14/07/2004 at 13:01, xxxxxxxx wrote:

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

    ---------
    Hi!

    I have a number of Bitmapbuttons in the Description of a Generator Object and I would like to catch the Events when they are pressed down.

    Some posts on Bitmapbuttons suggest it works to listen for the MSG_DESCRIPTION_COMMAND Message, when the Bitmapbutton is set to BUTTON in the Resource file, but this Message does not appear to be sent.

    Also there is a function in the BitmapButton CustomGUI to set a callback, but I don't know how to set it when I use the BitmapButton in a Resource. How do I get to the pointer to the actual BitmapButtonCustomGui?

    Any help would be greatly appreciated!

    Best Regards
    Timm Dapper



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

    On 20/07/2004 at 02:12, xxxxxxxx wrote:

    Sorry if any previous post was misleading. The messaging works slightly differently for bitmap buttons. This is how you would detect it:

        
        
        Bool MyNode::SetDParameter(GeListNode *node, const DescID &id, const GeData &t_data, LONG &flags)  
        {  
          switch(id[0].id)   
          {   
          case BITMAPBUTTON_ID:   
            {  
              if (flags&DESCFLAGS_USERINTERACTION)  
              {  
                /// user clicked on button  
              }  
              break;   
            }  
          }  
          return ObjectData::SetDParameter(node, id, t_data, flags);   
        }
    

Log in to reply