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
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Change the name of a button

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 437 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 30/08/2005 at 07:47, xxxxxxxx wrote:

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

      ---------
      I want to change the name of a button in my
      plugins GUI. I tried:

      SetString(IDC_BUTTON, "New Text");

      Nothing happens.
      Do I need to add an Event or is that
      late change simply not possible?

      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 30/08/2005 at 23:38, xxxxxxxx wrote:

        You can change it ...
        But as you said ... in an event that you wish ...

        Let's say .. there is a code in CreateLayout function ...

        //In CreateLayout
        AddButton(BTN_RENAME,0,100,10,"Rename");

        And then in Command function ...

        //In Command
        switch(id)
        {
           case BTN_RENAME:
           {
              SetString(BTN_RENAME,"NewName");
           }
           break;
        }

        If nothing happens ... please make it sure you didn't use the id of the button to other controls ..
        Sometimes it may happen like below ..

        #define BTN_RENAME 1111

        AddStaticText(1111,....
        AddButton(BTN_RENAME,....

        Hope it can help you ...
        ZawMinTun

        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 31/08/2005 at 00:50, xxxxxxxx wrote:

          Thanks for the help,
          but I already did it this way, except,
          that the button isn't added at runtime,
          but generated with the Resource-Editor,
          as recommended by the API doc.

          Changing another static text (also pre-
          defined) works.

          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 01/09/2005 at 10:25, xxxxxxxx wrote:

            This was my fault,
            one shouldn't use an ID (IDC_NAME)
            for a button and a group-id.
            An ID should be unique in the *.res
            file.

            Ok, this was trivial, but just in case
            someone finds my question after biting
            in the carpet with a similiar problem...

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