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

    bitmap button (the 99.)

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 536 Views
    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 Offline
      Helper
      last edited by

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

      On 17/10/2007 at 02:29, xxxxxxxx wrote:

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

      ---------
      Hi!
      I (desperately) try for some time now to get a working bitmapbutton in the active-object-manager.
      xxxx.res -->
           BITMAPBUTTON  RETRO_TEST{  BORDER; BUTTON; } //// RETRO_TEST==9000900
      <--xxxx.res   
      xxxx.h, xxxx.xpp------->
       
        class T_retro_main : public ObjectData
        {
          ........
          Bool Init(GeListNode* node);
          Bool Message(GeListNode* node, LONG type, void *ptr_data);
          .........
        }
       
        Bool T_retro_main::Init(GeListNode* node)
        {
          BaseContainer *ptrcont = GETDATACONTAINER_INSTANCE(node);
          BitmapButtonStruct *ptr_bbs = BitmapButtonStruct::Alloc();
          if(ptr_bbs)
          {
            ptr_bbs->op = (BaseList2D* )node;
            ptr_bbs->id.SetId( DescLevel(0x4711 , DTYPE_BUTTON /*?*/ , 0x00110011 ) );
            GeData gedata2 = GeData(CUSTOMDATATYPE_BITMAPBUTTON,*ptr_bbs);  
            ptrcont->SetData(9000900,gedata2);// RETRO_TEST==9000900
          };
          return(TRUE); 
        };
       
        Bool T_retro_main::Message(GeListNode* node, LONG type, void *ptr_data)
        {
        
         switch(...) ........
         case MSG_DESCRIPTION_GETBITMAP:    //<-------this does happen one or two times
              {
                 DescriptionGetBitmap*dgb=(DescriptionGetBitmap* )ptr_data;
                 .......alloc/compute bitmap mybm etc...
                 dgb->bmp=mybm;
              };
        };
      <------- xxxx.h, xxxx.xpp
       
       that displays a bitmap in aom.
       if the button is pressed nothing happens, no message nor something else except MSG_DESCRIPTION_GETBITMAP again.
       Is this the way to detect a pressed button?
       
       Somewhere there is a hint that there exist something like: 
          class BitmapButtonCustomGui : public BaseCustomGui<CUSTOMGUI_BITMAPBUTTON>
          {
            ........
            void SetCallback(const BitmapButtonCallback& cb);
          };
       which looks very promising. Unfortunately I cannot find a way to get this wonderful thing.
       I cannot find any connection between a xyz..CustomDataType and the corresponding xyz..CustomGui.
       (to be honest, I cannot even read that stuff without getting confused).

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

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

        On 18/10/2007 at 03:15, xxxxxxxx wrote:

        Here an example how to catch the BitmapButton.

        > _
        > Bool LookAtCamera::Message(GeListNode *node, LONG type, void *data)
        > {
        >      switch (type)
        >      {
        >           case MSG_DESCRIPTION_POSTSETPARAMETER:
        >           {
        >                DescriptionPostSetValue *dc = (DescriptionPostSetValue* ) data;
        >                if (dc->descid[0][0].id == LOOKATCAMERAEXP_BUTTON )
        >                {
        >                     GePrint("button");
        >                }
        >           }
        >      }
        >
        >      return TRUE;
        > }
        > _

        cheers,
        Matthias

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

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

          On 18/10/2007 at 06:00, xxxxxxxx wrote:

          Hi!
          Thanks for answering, I nearly thought, the question is too trivial.
           >>  Bool LookAtCamera::Message(GeListNode *node, LONG type, void *data)
           >>       switch (type)
           >>       {
           >>            case MSG_DESCRIPTION_POSTSETPARAMETER:
           
           
          ...unfortunately never happens. Maybe because it is a feature which appears in sdk-version 10.
          I am working with (yes I am somewhat behind developements) sdk-version 8.5, cinema-9.5
          But "bitmap button" is so old.
          The programmer must have had a plan as he (she? they?)  wrote that stuff.

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

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

            On 19/10/2007 at 13:05, xxxxxxxx wrote:

            I think you are stuck without it then. It seems that full BitmapButton support in the AM is only realized in R10. MSG_DESCRIPTION_POSTSETPARAMETER is only defined in R10 (yes, I searched the _api folder of earlier versions). You could check for a type == 19 and see if it works in R9.5 but wasn't full fleshed out (?)

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

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

              On 19/10/2007 at 19:54, xxxxxxxx wrote:

              Hi!
                > You could check for a type == 19
              I did of course.
              Its helpful to know that all trying could be in vain.
              So it will be an alternative solution.
              One button and a bitmap to the left.
              I will search the sdk-help-board for a solution
              to have that bitmap updated when the user presses the button.
              (I strongly believe, that no programmer will release
              something, that does not work entirely. So there must somewhere
              be some functionality left).
              Thanks!

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

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

                On 19/10/2007 at 23:36, xxxxxxxx wrote:

                Hi!
                  (Bitmapbutton <-> how to know that user clicked on)
                 
                If someone is interested. Mikael Sterner knew it some years ago.
                Search for "Sorry if any previous post was misleading."

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

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

                  On 20/10/2007 at 08:49, xxxxxxxx wrote:

                  An odd place to check for a button click (usually this is done in MSG_DESCRIPTION_COMMAND), but who am I to argue with Mikael with respect to Bitmapbuttons. 🙂

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