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

    Utilizing a tab in a .res file

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 330 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 06/12/2012 at 08:42, xxxxxxxx wrote:

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

      ---------
      So, I've been doing some more programming and I ran into an issue that a more experience plugin programmer has probably come across.

      So in my plugin I did a LoadDialogResource(DLG_TEST,NULL,0) to utilize the res file and string file to create the dialog.

      My issue is that in the .res file I've created some tabs (see below)

      DIALOG DLG_TEST
      {
      .....

      TAB TAB_ID
       {
      GROUP FIRST_TAB
      {
      ....}

      ....etc

      The tabs load up fine but for some reason I can't select each tab, it looks as if both of them are already selected.  In the documentation it states "Use GetLong() and SetLong() with the sub-group ID to control the active tab"

      Can someone elaborate on this for me?  I am a bit lost as to what that means, I understand that it has to do with the GeDialog class but I'm not sure how I would get the sub-group ID, and where I would put this code in my derived class of the GeDialog class.

      Thanks everyone for the help.

      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 06/12/2012 at 09:18, xxxxxxxx wrote:

        Normally you don't need to do anything for a tab beyond defining it in the .res file. C4D handles switching between tabs automatically on click - I don't write any code for that.

        If both tabs seem selected, that sounds more like a problem with the IDs to me. Is FIRST_TAB different from SECOND_TAB different from TAB_ID od did you accidentally write something like
        enum {TAB_ID=1000, FIRST_TAB=1000, SECOND_TAB=1000} ?

        The sub-group IDs in the example are FIRST_TAB and SECOND_TAB, and the way to switch the tabs programmatically is simply to call
        SetLong(TAB_ID, FIRST_TAB);
        on the dialog.

        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 06/12/2012 at 09:27, xxxxxxxx wrote:

          OH man! You totally solved my problem.  I didn't put the tab names and IDs in the c4d_symbols.h file...You rock Cairyn!

          Thanks!

          Jimmy
          http://www.jimmycoppens.com

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