Image/bitmap into dialog as title
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/01/2009 at 03:16, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11
Platform: Windows ;
Language(s) : C++ ;---------
I know how to add text to a dialog box, but how can I insert my own image? I would like to create a custom title for the dialog window of a plugin that I am working on. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/01/2009 at 06:28, xxxxxxxx wrote:
Inside your Dialog's CreateLayout() :
BaseContainer tbc;
tbc.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_BITMAPBUTTON);
tbc.SetLong(BITMAPBUTTON_BORDER, BORDER_NONE);
tbc.SetBool(BITMAPBUTTON_BUTTON, FALSE);
tbc.SetBool(BITMAPBUTTON_TOGGLE, FALSE);
tbc.SetBool(BITMAPBUTTON_DRAWPOPUPBUTTON, FALSE);
Filename bg;
// Column: Banner
// - BitMap Button
BitmapButtonCustomGui* bmbutton = (BitmapButtonCustomGui* )AddCustomGui(IP_ABOUT, CUSTOMGUI_BITMAPBUTTON, String(), BFH_CENTER|BFV_CENTER, SizePix(256L), SizePix(40L), tbc);
if (bmbutton)
{
bg = GeGetPluginPath()+Filename("res")+Filename("banner.tif");
if (GeFExist(bg)) bmbutton->SetImage(bg, FALSE);
}Note that the SizePix() values will be the width and height of your image.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/01/2009 at 06:35, xxxxxxxx wrote:
There are several ways to do this. The one Robert has posted is probably the most straight forward. Another way would be to use user areas (GeUserArea) for additional control, although this can get quite complex.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/01/2009 at 11:13, xxxxxxxx wrote:
Beautiful! Thank you.