THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/12/2012 at 15:08, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform: Windows ;
Language(s) : C++ ;
---------
Can anyone tell me how to set the BORDER_OUT option for a bitmap button that's on a tag?
Oddly enough. I can create a copy of the button and then set the BORDER_OUT option just fine.
But I can't figure out how to do it to the original bitmap button.
//The .res file
BITMAPBUTTON IMG_BUTTON {ANIM OFF;}
//The .cpp code
Bool SimpleTag::GetDDescription(GeListNode *node, Description *description,DESCFLAGS_DESC &flags)
{
BaseTag *tag = (BaseTag* )node;
BaseContainer *data = tag->GetDataInstance();
if (!description->LoadDescription(node->GetType())) return FALSE;
const DescID *singleid = description->GetSingleDescID();
DescID cid = DescLevel(IMG_BUTTON, DTYPE_BUTTON, 0); //My bitmap button's ID is "IMG_BUTTON"
BaseContainer bmbBC;
if (!singleid || cid.IsPartOf(*singleid,NULL)) //important to check for speedup c4d!
{
bmbBC.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_BITMAPBUTTON); //<--This makes a copy of the bitmap button
bmbBC.SetLong(BITMAPBUTTON_BORDER, BORDER_OUT); //The copy has an out border... but original button does not!?
bmbBC.SetBool(BITMAPBUTTON_BUTTON, TRUE);
}
if (!description->SetParameter(cid,bmbBC,DescLevel(ID_OBJECTPROPERTIES))) return FALSE;
flags |= DESCFLAGS_DESC_LOADED;
return TRUE;
}
-ScottA