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

    Logo on the plugin surface

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 563 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/2006 at 03:40, xxxxxxxx wrote:

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

      ---------
      Hi,
      my plugin ist now complete only the logo of our company is missing on the gui of te plugin. How can i bring the tif file on the plugin window?
      Thx

      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/12/2006 at 19:23, xxxxxxxx wrote:

        Hello Murakami ...

        I think there may be a few ways you can do it ...

        I used to do it like this ...

        ///////
        BaseContainer bcLogo;
        BitmapButtonCustomGui *btLogo;

        bcLogo.SetBool(BITMAPBUTTON_BUTTON,TRUE);
        bcLogo.SetLong(BITMAPBUTTON_BORDER,BORDER_THIN_IN);
        btLogo=(BitmapButtonCustomGui* )AddCustomGui(BTN_SIMPLE,CUSTOMGUI_BITMAPBUTTON,String(),BFH_SCALEFIT|BFV_SCALEFIT,0,0,bcLogo);
        if(btLogo)
        {
           Filename fnLogo=Filename("C:\\Logo.jpg");
           btLogo->SetImage(fnLogo);
        }
        ///////
        *** You need to have a Logo.jpg file in 😄 and the size of the picture sholud be the size you wanted ...

        You can put the code block in the CreateLayout function ...
        But ... some don't like it ... bcos' it can be clearly seen as a button ...
        So if you want to use the other way ... you should take a look at GeUserArea ...
        It is also fully documented in SDK Help ...

        Wishing you all the best ...
        Zaw Min Tun

        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/12/2006 at 21:26, xxxxxxxx wrote:

          Here's how to force people to like it (or else!) 😉

          bcLogo.SetLong(BITMAPBUTTON_BORDER, BORDER_NONE);
          bcLogo.SetBool(BITMAPBUTTON_BUTTON, FALSE);

          No border, no 'button', just the image. This is the only real way to do it. GeUserArea is really too much for a simple logo image.

          Also, if you are going to specify the image dimensions, use SizePix(w), SizePix(h) and not just the pixel values. For some unknown reason, Maxon decided that these GUI dimensions default to 1/10th of the font values rather than pixels. :🤷: SizePix() guarantees pixel values instead.

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

            Hi

            I found this post and think this is exactly what i need,
            so i copied the code 1:1 in my PlugIn Script.

            > \> MyDialog::CreateLayout() \> { \> SetTitle("My Title"); \> BaseContainer bclogo; \> BitmapButtonCustomGui \*btlogo; \> \> bclogo.SetBool(BITMAPBUTTON_BUTTON,TRUE); \> bclogo.SetLong(BITMAPBUTTON_BORDER,BORDER_THIN_IN); \> btlogo=(BitmapButtonCustomGui\* )AddCustomGui(BTN_SIMPLE,CUSTOMGUI_BITMAPBUTTON,String(),BFH_SCALEFIT|BFV_SCALEFIT,0,0,bclogo); \> if(btlogo) \> { \>    Filename fnlogo=Filename("C:\\logo.jpg"); \>    btlogo->SetImage(fnlogo); \> } \> //Here goes my Layout .... \> AddGroupBeginV(6000, BFH_SCALEFIT,3,"group",0); \> {     AddGroupBorder( BORDER_GROUP_IN); \>      AddGroupBorderSpace (4,4,4,4); \>

            The Problem is: It doesn't work.

            My CreateLayout function already runs, but with this Code
            i get Syntax error [Expected';'found'<Statement>'] at the end of the first line.
            What is the problem?
            Hope someone can help me 🙂

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

              CreateLayout() returns a Bool, so it should be:

              > Bool MyDialog::CreateLayout() \> { \>      // Call parent instance \>      Bool     retval = GeDialog::CreateLayout(); \> ... \>      return retval; \> }

              Also note that you should call the base CreateLayout().

              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/02/2008 at 01:25, xxxxxxxx wrote:

                hey Robert

                Thank u for the answer. I tried a lot but didn't make it:( My CreateLayout() already returned a Bool.
                Again, here is my working! Code.
                Maybe u, or someone else here, find some time to add the BittmapButton Code or can tell me more exactly what to do.

                > \> var sun,season; //Globale Variables \> //Here starts the dialog \> \> class MyDialog : GeModalDialog \> { \> public: \> MyDialog(); \> CreateLayout(); \> Init(); \> AskClose(); \> } \> MyDialog::MyDialog() \> { \> super(); \> } \> MyDialog::CreateLayout() // The dialog layout \> { \> SetTitle("MyTitle"); \> //here i shorted a bit \> AddGroupBeginV(6000, BFH_SCALEFIT,3,"group",0); \> {          AddGroupBorder( BORDER_GROUP_IN); \>      AddGroupBorderSpace (4,4,4,4); \>      AddRadioGroupV(6001, BFH_SCALEFIT,1);                  AddItem(6001,1,"Frühling"); \>      AddItem(6001,2,"Sommer"); \>      AddItem(6001,3,"Herbst"); \>      AddItem(6001,4,"Winter"); \>      } \> AddGroupEnd(); \> AddDlgGroup(DR_DLGGROUP_OK | DR_DLGGROUP_CANCEL); \> return TRUE; \> } \> MyDialog::Init()                                \> { \> //here i shorted a bit \> return TRUE; \> } \> MyDialog::AskClose()                               \> { \> //here i shorted a bit           \> return FALSE;         \> } \> //End of dialog \> main(doc,op) \> { \> var d = new(MyDialog); \> d->Open(-1,-1); \> //here i shorted a bit \> if (d->GetResult() == FALSE) println("------------------"); return; \> } \>

                I shorted some irrelevant Parts.

                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/02/2008 at 09:14, xxxxxxxx wrote:

                  Okay, but that's COFFEE. The code given is C++. There are very few similarities working with the two. 😉

                  COFFEE doesn't have types (BitmapButtonCustomGui* for instance). It is typeless - everything is declared 'var'. And it doesn't have AddCustomGui().

                  I don't recollect exactly but you may only be able to add an image to a dialog in COFFEE using a GeUserArea. Ah, see this thread:

                  http://www.plugincafe.com/forum/display_topic_threads.asp?ForumID=4&TopicID;=1655&PagePosition;=113

                  You may also want to consider purchasing Rui Batista's COFFEE book. He might explain with more certainty how to do this from the experience he has gained since.

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