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

    GeDialog commands (source them out)

    SDK Help
    0
    7
    573
    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 15/07/2008 at 01:32, xxxxxxxx wrote:

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

      ---------
         Hi!

      I have a problem with the GeDialog. Can I source out some commands?

      For example

      > `

        
      \>  class myGUI : public GeDialog  
      \>  {  
      \>    
      \>  public:  
      \>    
      \>      void createLayout()  
      \>      {  
      \>          create_my_own_gui();  
      \>      }  
      \>    
      \>  }  
      \>    
      \>    
      \>    
      \>  void create_my_own_gui()  
      \>  {  
      \>  AddStaticText(....);  
      \>  }  
      \>  
      

      `

      In this case, my compiler reports "Cannot use AddStaticText without an object."

      What can I do? 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 15/07/2008 at 02:11, xxxxxxxx wrote:

        AddStaticText() is a memberfunction of the class GeDialog, so your new function create_my_own_gui() should be a member of your derived class myGUI.

        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 15/07/2008 at 02:12, xxxxxxxx wrote:

          Hi! 🙂

          Yes, you're right, the problem is, I have to source the memberfunctions out of the hole class... 😕

          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 15/07/2008 at 02:26, xxxxxxxx wrote:

            You could try declaring create_my_own_gui() as a friend in your class myGUI, then it should have access to its members, not sure if it will work though:

            class myGUI : public GeDialog
            {

            public:
                
                friend void create_my_own_gui();

            void createLayout()
                {
                    create_my_own_gui();
                }
            }

            void create_my_own_gui()
            {
            AddStaticText(....);
            }

            If it doesnt work, try something like:
            (function still declared as a friend)
            void create_my_own_gui()
            {
            myGUI test;
            test.AddStaticText(....);
            }

            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 15/07/2008 at 02:41, xxxxxxxx wrote:

              Ah! Thats a good idea. I will give it a try.. Thanks 🙂

              I give feedback on success..

              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 15/07/2008 at 03:29, xxxxxxxx wrote:

                Hi! 🙂

                Now it works. I use this way:

                void create_my_own_gui(myGUI *t)
                {
                if(!t) return;

                t->AddStaticText(....);
                }

                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 15/07/2008 at 10:44, xxxxxxxx wrote:

                  CreateLayout() is a virtual/overloadable method of the GeDialog class, so don't bother with using your own name, just overload the original function...

                      
                      
                        
                      class myGUI : public GeDialog  
                      {  
                      public:  
                          virtual Bool CreateLayout(void);  
                      }  
                        
                      Bool myGUI::CreateLayout(void)  
                      {  
                          AddStaticText(....);  
                          ...etc...  
                          return true;  
                      }  
                      
                  

                  ...if you look in the SDK docs for the GeDialog class (as well as numerous others), you'll see several methods with 'virtual' tacked in front, sometimes with the comment:  "//Functions to override" ...you can override any of those that you need to when you derive from that class.

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