Logo on the plugin surface
-
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 -
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 -
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.
-
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 -
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().
-
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.
-
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.