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

    GeUserArea->DrawBitmap()...

    SDK Help
    0
    2
    337
    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 10/02/2003 at 23:17, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.012 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      I want to display an image in a GeModalDialog.  From what I've read, this requires a GeUserArea added to the dialog during CreateLayout().  Nevertheless, the image never shows up.

          
          
          
          
          // This BaseBitmap is created and an image loaded in main().  
          // There is definitely a valid image here.  
          var error_icon;
          
          
          
          
          // CLASS: My GeUserArea  
          class MyUserArea : GeUserArea  
          {  
           public:  
            MyUserArea(id, dialog);  
            Init();  
          }  
          MyUserArea::MyUserArea(id, dialog) { super(id, dialog); }  
          MyUserArea::Init()  
          {  
           // error_icon width and height;  
           var eiw, eih;
          
          
          
          
           eiw = plugin_icon->GetWidth();  
           eih = plugin_icon->GetHeight();  
           DrawBitmap(plugin_icon, 0, 0, eiw, eih, 0, 0, eiw, eih, BMP_NORMAL);  
          }
          
          
          
          
            
          // CLASS: Error Dialog  
          class Error_GeModalDialog : GeModalDialog  
          {  
           private:  
            var userarea;  
           public:  
            Error_GeModalDialog();  
            CreateLayout();  
          }  
          // Constructor  
          Error_GeModalDialog::Error_GeModalDialog() { super(); }  
          // Layout Dialog GUI  
          Error_GeModalDialog::CreateLayout()  
          {  
          ...  
           // Register a user area with id 4000 first.  
           AddUserArea(4000,BFH_CENTER|BFV_CENTER,error_icon->GetWidth(),error_icon->GetHeight());  
           // Then allocate and attach the user area.  
           userarea = new(MyUserArea,4000,this);  
          ...  
          }  
          
      

      Thanks for any help,
      Robert Templeton

      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 10/02/2003 at 23:20, xxxxxxxx wrote:

        Oops! Before you note that it says "plugin_icon" instead of "error_icon" in MyUserArea, I just forgot to change it back trying to see if transparency was causing issues.
        Robert Templeton

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