Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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 Buttons

    SDK Help
    0
    4
    414
    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

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

      On 02/04/2003 at 13:51, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.100 
      Platform:      Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hello,
          I implemeted the source code found in this forum for a BitmapButton. The original res declaration for the button is in the res file ( BITMAPBUTTON PLUGIN_BUTTON {} ). Everything works fine except there is no event generated when the button is clicked on. I am checking using the following:

      case MSG_DESCRIPTION_COMMAND:
                               {
                                    DescriptionCommand *dc = ( DescriptionCommand * ) data;
                                    if ( dc->id[0].id == PLUGIN_BUTTON )
                                         {
                                              GePrint( "Here We Are" ); // ***
                                         }
                               }

      This message is never sent unless I change the res file element to BUTTON instead of BITMAP_BUTTON. I think that I am not setting a seond image for the button may be an issue. The code I found only sets one image:

      case MSG_DESCRIPTION_GETBITMAP:
                               {
                                    DescriptionGetBitmap* dgb = static_cast < DescriptionGetBitmap * > ( data );
                                    if ( dgb->id[0] == PLUGIN_BUTTON )
                                         {
                                              AutoAlloc < BaseBitmap > bm;
                                              bm->Init( GeGetPluginPath() + Filename( "res" ) + Filename( "PLUGIN_BUTTON_UP.tif" ) );
                                              dgb->bmp = bm.Release();
                                         }
                               }

      Where and how should I set the second down image? Is it possible that is why there is not event generated?

      Thanks!

      bt

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

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

        On 04/04/2003 at 01:24, xxxxxxxx wrote:

        I would like to know that too :
        Trying to get teh Customdatatype and setting the image with SetImage() (no matter where) or even GetHeight does crash my cinema 4d immediately.
        P.S.: Would be highly appreciated if you could tell me if you find out darf. Thanks

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

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

          On 04/04/2003 at 04:58, xxxxxxxx wrote:

          You must set the "BITMAPBUTTON_BUTTON" flag in the settings. In the resource file this means "BITMAPBUTTON PLUGIN_BUTTON {BUTTON; }".

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

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

            On 04/04/2003 at 05:05, xxxxxxxx wrote:

            I did BITMAPBUTTON ID {BORDER; BUTTON;}
            But that doesn´t help setting a second image when the button is pressed down. :
            BitmapButtonCustomGui butt = (BitmapButtonCustomGui* )data->GetCustomDataType(id,CUSTOMGUI_BITMAPBUTTON);
            butt->SetImage(bm,TRUE);
            this code then crashes cinema 4D. Maybe I am doing it in the wrong function (tried in message,init)? Where do we have to set the second image?

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